mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Add ConditionVariable.wait_until and ConditionVariable.wait_for (#2302)
* Add `ConditionVariable.wait_until` and `ConditionVariable.wait_for` * Add "@structlike" for typedefs. --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This commit is contained in:
committed by
GitHub
parent
448176b0b7
commit
2053f2767b
@@ -12,10 +12,10 @@ fn Clock native_clock()
|
||||
ulong mult = 0;
|
||||
if (!freq.quadPart)
|
||||
{
|
||||
if (!win32::queryPerformanceFrequency(&freq)) return 0;
|
||||
if (!win32::queryPerformanceFrequency(&freq)) return (Clock)0;
|
||||
}
|
||||
Win32_LARGE_INTEGER counter @noinit;
|
||||
if (!win32::queryPerformanceCounter(&counter)) return 0;
|
||||
if (!win32::queryPerformanceCounter(&counter)) return (Clock)0;
|
||||
return (Clock)counter.quadPart.muldiv(1_000_000_000, freq.quadPart);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user