Browse Source

*** empty log message ***

master
Marc Alexander Lehmann 13 years ago
parent
commit
bd3019b49c
  1. 23
      ev_win32.c

23
ev_win32.c

@ -133,22 +133,21 @@ fail:
#undef pipe
#define pipe(filedes) ev_pipe (filedes)
static int
ev_gettimeofday (struct timeval *tv, struct timezone *tz)
#define EV_HAVE_EV_TIME 1
ev_tstamp
ev_time (void)
{
struct _timeb tb;
_ftime (&tb);
FILETIME ft;
ULARGE_INTEGER ui;
tv->tv_sec = (long)tb.time;
tv->tv_usec = ((long)tb.millitm) * 1000;
GetSystemTimeAsFileTime (&ft);
ui.u.LowPart = ft.dwLowDateTime;
ui.u.HighPart = ft.dwHighDateTime;
return 0;
/* msvc cannot convert ulonglong to double... yes, it is that sucky */
return (__int64)(ui.QuadPart - 116444736000000000) * 1e-7;
}
#undef gettimeofday
#define gettimeofday(tv,tz) ev_gettimeofday (tv, tz)
#endif

Loading…
Cancel
Save