Mercurial > audlegacy
annotate Plugins/Input/wma/libffwma/os_support.c @ 1458:f12d7e208b43 trunk
[svn] Update FSF address in copyright notices. Update autotools templates.
author | chainsaw |
---|---|
date | Wed, 02 Aug 2006 15:44:07 -0700 |
parents | 0bea7509d6ba |
children | 705d4c089fce |
rev | line source |
---|---|
137 | 1 /* |
2 * Various utilities for ffmpeg system | |
3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard | |
4 * | |
5 * This library is free software; you can redistribute it and/or | |
6 * modify it under the terms of the GNU Lesser General Public | |
7 * License as published by the Free Software Foundation; either | |
8 * version 2 of the License, or (at your option) any later version. | |
9 * | |
10 * This library is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 * Lesser General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU Lesser General Public | |
16 * License along with this library; if not, write to the Free Software | |
1458
f12d7e208b43
[svn] Update FSF address in copyright notices. Update autotools templates.
chainsaw
parents:
218
diff
changeset
|
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA |
137 | 18 */ |
19 #include "avformat.h" | |
218
0bea7509d6ba
[svn] Working WMA support. I never said it would be pretty, neno, I should said it would play.
chainsaw
parents:
210
diff
changeset
|
20 |
137 | 21 #include <unistd.h> |
22 #include <fcntl.h> | |
23 #include <sys/time.h> | |
24 #include <time.h> | |
25 | |
26 int64_t av_gettime(void) | |
27 { | |
28 struct timeval tv; | |
29 gettimeofday(&tv,NULL); | |
30 return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; | |
31 } | |
32 | |
33 #if !defined(HAVE_LOCALTIME_R) | |
34 struct tm *localtime_r(const time_t *t, struct tm *tp) | |
35 { | |
36 struct tm *l; | |
37 | |
38 l = localtime(t); | |
39 if (!l) | |
40 return 0; | |
41 *tp = *l; | |
42 return tp; | |
43 } | |
44 #endif /* !defined(HAVE_LOCALTIME_R) */ |