mirror of
https://github.com/logos-storage/logos-storage-network-crawler.git
synced 2026-01-03 14:03:09 +00:00
11 lines
219 B
Nim
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()
|