mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Dynamic protocols.
This commit is contained in:
committed by
Christoffer Lerno
parent
4cc30c0d33
commit
49c4595457
@@ -1,9 +1,9 @@
|
||||
module std::time;
|
||||
|
||||
def Time = distinct long @inline;
|
||||
def Duration = distinct long @inline;
|
||||
def Clock = distinct ulong @inline;
|
||||
def NanoDuration = distinct long @inline;
|
||||
def Time = distinct long;
|
||||
def Duration = distinct long;
|
||||
def Clock = distinct ulong;
|
||||
def NanoDuration = distinct long;
|
||||
|
||||
const Duration MS = 1_000;
|
||||
const Duration SEC = 1_000_000;
|
||||
@@ -97,7 +97,7 @@ fn Duration NanoDuration.to_duration(nd) => (Duration)nd / 1_000;
|
||||
fn NanoDuration Duration.to_nano(td) => (NanoDuration)td * 1_000;
|
||||
fn long Duration.to_ms(td) => (long)td / 1_000;
|
||||
|
||||
fn usz! NanoDuration.to_format(&self, Formatter* formatter) @dynamic
|
||||
fn usz! NanoDuration.to_format(&self, Formatter* formatter) : Printable
|
||||
{
|
||||
NanoDuration nd = *self;
|
||||
if (nd == 0)
|
||||
|
||||
Reference in New Issue
Block a user