Time Library (Time)
Library for Time ("system" feature).
Example Usage
#[main]
fn main() {
const now = Time.now(); // default units are ms
sleep(50ms);
pln(Time.diff(now) as seconds); // having units is really nice
}Time.diff(prev: float) -> ms
const ts = Time.now();
sleep(50ms);
const diff = Time.diff(ts);
assert(diff >= 50ms);Time.diff_ns(prev: float) -> ns
Time.from_rfc2822(time: str) -> ms
Time.from_rfc3339(time: str) -> ms
Time.now() -> ms
Time.now_ns() -> ns
Time.now_rfc2822() -> str
Time.now_rfc3339() -> str
Time.sleep(time: float = 1000ms) -> void
Time.to_rfc2822(time: float) -> str
Time.to_rfc3339(time: float) -> str
Last updated