#include #include /* * returns the number of milliseconds since midnight. */ long MilliTime(void) { static struct timeval tv[1]; if(gettimeofday(tv, NULL) < 0) return(-1); return((tv->tv_sec % 86400) * 1000 + tv->tv_usec / 1000); }