summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorfaust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-04 19:27:46 +0000
committerfaust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-04 19:27:46 +0000
commita8dd582c4570ad649c237a9cdbf44ee12ce32ec7 (patch)
tree3eb7209d5ee439f15f8b76304bf13cefe9f4142a /osdep
parentbe474fc5d0e70cb46c5e1482a4731e9ba18ea60c (diff)
downloadmpv-a8dd582c4570ad649c237a9cdbf44ee12ce32ec7.tar.bz2
mpv-a8dd582c4570ad649c237a9cdbf44ee12ce32ec7.tar.xz
gettimeofday() emulation using ftime()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9830 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'osdep')
-rw-r--r--osdep/gettimeofday.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/osdep/gettimeofday.c b/osdep/gettimeofday.c
new file mode 100644
index 0000000000..2d8baa6e90
--- /dev/null
+++ b/osdep/gettimeofday.c
@@ -0,0 +1,11 @@
+
+#ifndef HAVE_GETTIMEOFDAY
+#include <sys/time.h>
+#include <sys/timeb.h>
+void gettimeofday(struct timeval* t,void* timezone)
+{ struct timeb timebuffer;
+ ftime( &timebuffer );
+ t->tv_sec=timebuffer.time;
+ t->tv_usec=1000*timebuffer.millitm;
+}
+#endif