mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-03 08:34:37 +00:00
16 lines
293 B
Nim
16 lines
293 B
Nim
import std/times
|
|
|
|
import codex/systemclock
|
|
|
|
import ../asynctest
|
|
import ./helpers
|
|
|
|
asyncchecksuite "SystemClock":
|
|
test "Should get now":
|
|
let clock = SystemClock.new()
|
|
|
|
let expectedNow = times.now().utc
|
|
let now = (await clock.now())
|
|
|
|
check now == expectedNow.toTime().toUnix()
|