mirror of https://github.com/waku-org/nwaku.git
Time util file
This commit is contained in:
parent
2b5c360746
commit
08ca99b6f6
|
@ -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…
Reference in New Issue