mirror of
https://github.com/waku-org/nwaku.git
synced 2025-02-06 03:54:54 +00:00
Time util file
This commit is contained in:
parent
2b5c360746
commit
08ca99b6f6
15
waku/v2/utils/time.nim
Normal file
15
waku/v2/utils/time.nim
Normal file
@ -0,0 +1,15 @@
|
||||
## Contains types and utilities for timestamps.
|
||||
|
||||
{.push raises: [Defect].}
|
||||
|
||||
proc getNanosecondTime*(t: float64): int64 =
|
||||
var tns = t*100000000
|
||||
return tns
|
||||
|
||||
proc getMicrosecondTime*(t: float64): int64 =
|
||||
var tmus = t*1000000
|
||||
return tns
|
||||
|
||||
proc getMillisecondTime*(t: float64): int64 =
|
||||
var tms = t*1000
|
||||
return tms
|
Loading…
x
Reference in New Issue
Block a user