Information Systems



Linux version of timeGetTime()?

If you want to use timeGetTime() on Linux, you need to roll your own function.

#include <sys/time.h>

unsigned int timeGetTime()
{
struct timeval now;
gettimeofday(&now, NULL);
return now.tv_usec/1000;
}

Note that gettimeofday returns time relative to an epoch while timeGetTime on Windows returns based on system startup time.