Linux Equivalent of the Windows GetTickCount() function
GetTickCount() is a real handy function in Windows but does not exist in Linux. This code will give a similar result:
#include <sys/time.h>
unsigned GetTickCount()
{
struct timeval tv;
if(gettimeofday(&tv, NULL) != 0)
return 0;
return (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
}
