comparison osdep/gettimeofday.c @ 9829:0f2cc9ef24f6

gettimeofday() emulation using ftime()
author faust3
date Fri, 04 Apr 2003 19:27:46 +0000
parents
children 5c639ec8c39e
comparison
equal deleted inserted replaced
9828:c5fd755db576 9829:0f2cc9ef24f6
1
2 #ifndef HAVE_GETTIMEOFDAY
3 #include <sys/time.h>
4 #include <sys/timeb.h>
5 void gettimeofday(struct timeval* t,void* timezone)
6 { struct timeb timebuffer;
7 ftime( &timebuffer );
8 t->tv_sec=timebuffer.time;
9 t->tv_usec=1000*timebuffer.millitm;
10 }
11 #endif