Switch to <* *> docs. Fix issue with dynamically loaded C3 libs with other C3 code.

This commit is contained in:
Christoffer Lerno
2024-10-12 17:55:05 +02:00
committed by Christoffer Lerno
parent 9f6a4eb300
commit 31cd839063
119 changed files with 3271 additions and 3277 deletions

View File

@@ -1,9 +1,11 @@
module libc;
import std::time;
/**
* @require self >= 0
**/
<*
Return a "timespec" from a duration.
@require self >= 0
*>
fn TimeSpec NanoDuration.to_timespec(self) @inline
{
CLong ns = (CLong)(self % 1000_000_000);
@@ -11,9 +13,11 @@ fn TimeSpec NanoDuration.to_timespec(self) @inline
return { .s = sec, .ns = ns };
}
/**
* @require self >= 0
**/
<*
Convert a duration to a timespec.
@require self >= 0
*>
fn TimeSpec Duration.to_timespec(self) @inline
{
CLong ns = (CLong)(1000 * (self % time::SEC));