void gettimeofday(struct timeval *tv, struct timezone *tz) { long l = startuptime + GetTickCount(); tv->tv_sec = l / 1000; tv->tv_usec = (l % 1000) * 1000; return; }