MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Timer_GetTime

Function Timer_GetTime

src/timer.c:68–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67
68uint32 Timer_GetTime(void)
69{
70#if defined(_MSC_VER)
71 DWORD t;
72 t = timeGetTime();
73 return t;
74#elif defined(TOS)
75 /* use the 200 HZ system timer which has a 5ms granularity */
76 return get_sysvar(_hz_200) * 5;
77#elif defined(__WATCOMC__)
78 return clock() * 1000 / CLOCKS_PER_SEC;
79#else
80 struct timeval tv;
81 gettimeofday(&tv, NULL);
82 return tv.tv_sec * 1000 + tv.tv_usec / 1000;
83#endif /* _MSC_VER */
84}
85
86/**
87 * Run the timer interrupt handler.

Callers 3

Timer_InterruptRunFunction · 0.85
Timer_InitFunction · 0.85
Video_ShowFPS_2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected