2025-02-13 10:49:50 +01:00

11 lines
219 B
Nim

import std/times
type Clock* = ref object of RootObj
method now*(clock: Clock): uint64 {.base, gcsafe, raises: [].} =
let now = times.now().utc
now.toTime().toUnix().uint64
proc createClock*(): Clock =
Clock()