MCPcopy Create free account
hub / github.com/devkitPro/libctru / osGetTimeRef

Function osGetTimeRef

libctru/source/os.c:50–64  ·  view source on GitHub ↗

---------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

48
49//---------------------------------------------------------------------------------
50osTimeRef_s osGetTimeRef(void) {
51//---------------------------------------------------------------------------------
52 osTimeRef_s tr;
53 u32 next = OS_SharedConfig->timeref_cnt;
54 u32 cur;
55
56 do {
57 cur = next;
58 tr = OS_SharedConfig->timeref[cur&1];
59 __dmb();
60 next = OS_SharedConfig->timeref_cnt;
61 } while (cur != next);
62
63 return tr;
64}
65
66//---------------------------------------------------------------------------------
67u64 osGetTime(void) {

Callers 1

osGetTimeFunction · 0.85

Calls 1

__dmbFunction · 0.85

Tested by

no test coverage detected