LEVIATHAN v962456e · 962456eee1

Standard Library

class SystemClock

The real clock behind the IClock interface.

since 0.1.0-alpha.1linuxwindows

bases
IClock

Examples

IClock clock = SystemClock();
console.writeln(clock.now() > 0);
true

Methods

now

now() -> int

The real current time as milliseconds since 1 January 1970 UTC.

Returns

The number of milliseconds since the Unix epoch.

Examples

SystemClock clock = SystemClock();
int first = clock.now();
int second = clock.now();
console.writeln(second >= first);
true

See also

  • IClock — What a program may know about the time.