mirror of https://github.com/waku-org/nwaku.git
Fixes getNanosecondTime() time conversion (#878)
* fixes conversion from sec to nanosec * uses snake case for power of 10 for readability
This commit is contained in:
parent
8ed31ffddb
commit
2f73667a96
|
@ -9,11 +9,11 @@ type Timestamp* = int64
|
|||
const TIMESTAMP_TABLE_TYPE* = "INTEGER"
|
||||
|
||||
proc getNanosecondTime*[T](timeInSeconds: T): Timestamp =
|
||||
var ns = Timestamp(timeInSeconds*100000000)
|
||||
var ns = Timestamp(timeInSeconds*1000_000_000)
|
||||
return ns
|
||||
|
||||
proc getMicrosecondTime*[T](timeInSeconds: T): Timestamp =
|
||||
var us = Timestamp(timeInSeconds*1000000)
|
||||
var us = Timestamp(timeInSeconds*1000_000)
|
||||
return us
|
||||
|
||||
proc getMillisecondTime*[T](timeInSeconds: T): Timestamp =
|
||||
|
|
Loading…
Reference in New Issue