MCPcopy Create free account
hub / github.com/crownengine/crown / now

Function now

src/core/time.cpp:23–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace time
22{
23 s64 now()
24 {
25#if CROWN_PLATFORM_WINDOWS
26 LARGE_INTEGER ttime;
27 QueryPerformanceCounter(&ttime);
28 return (s64)ttime.QuadPart;
29#elif CROWN_PLATFORM_OSX
30 struct timeval now;
31 gettimeofday(&now, NULL);
32 return now.tv_sec * s64(1000000) + now.tv_usec;
33#else
34 timespec now;
35 clock_gettime(CLOCK_MONOTONIC, &now);
36 return now.tv_sec * s64(1000000000) + now.tv_nsec;
37#endif
38 }
39
40 inline s64 frequency()
41 {

Callers 14

mixerProcMethod · 0.85
mixerProcMethod · 0.85
enter_profile_scopeFunction · 0.85
leave_profile_scopeFunction · 0.85
test_timeFunction · 0.85
watchMethod · 0.85
watchMethod · 0.85
scan_and_restoreMethod · 0.85
compile_internalMethod · 0.85
DeltaTimeFilterMethod · 0.85
filterMethod · 0.85
frameMethod · 0.85

Calls 2

gettimeofdayFunction · 0.85
clock_gettimeFunction · 0.85

Tested by 1

test_timeFunction · 0.68