00001 #include "sysdep.h" 00002 00003 #ifdef GCC 00004 00005 #include <sys/time.h> 00006 00007 // Returns a time index in milliseconds 00008 DWORD GetTickCount() 00009 { 00010 static struct timezone tz={0,0}; 00011 static const double t1=1000.0; 00012 static const double t2=0.001; 00013 timeval t; 00014 gettimeofday(&t,&tz); 00015 return long((t.tv_sec&0x000FFFFF)*t1 + t.tv_usec*t2); 00016 } 00017 00018 #endif