#include <SysUtils.h>
Definition at line 36 of file SysUtils.h.
Static Public Member Functions | |
| static long | getCurrentMillis () |
| long SysUtils::getCurrentMillis | ( | ) | [static] |
Definition at line 45 of file SysUtils.cpp.
Referenced by NLBuilder::build(), MSNet::closeBuilding(), MSNet::closeSimulation(), NLBuilder::load(), GUIRunThread::run(), and MSNet::simulationStep().
00045 { 00046 #ifndef WIN32 00047 timeval current; 00048 gettimeofday(¤t, 0); 00049 long nanosecs = 00050 (long) current.tv_sec * 1000L + (long) current.tv_usec / 1000L; 00051 return nanosecs; 00052 #else 00053 LARGE_INTEGER val, val2; 00054 BOOL check = QueryPerformanceCounter(&val); 00055 check = QueryPerformanceFrequency(&val2); 00056 return (long)(val.QuadPart*1000/val2.QuadPart); 00057 #endif 00058 }
1.5.6