mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-07 16:33:08 +00:00
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
18c562965e
commit
58a6a3c827
@ -9,11 +9,11 @@ type Timestamp* = int64
|
|||||||
const TIMESTAMP_TABLE_TYPE* = "INTEGER"
|
const TIMESTAMP_TABLE_TYPE* = "INTEGER"
|
||||||
|
|
||||||
proc getNanosecondTime*[T](timeInSeconds: T): Timestamp =
|
proc getNanosecondTime*[T](timeInSeconds: T): Timestamp =
|
||||||
var ns = Timestamp(timeInSeconds*100000000)
|
var ns = Timestamp(timeInSeconds*1000_000_000)
|
||||||
return ns
|
return ns
|
||||||
|
|
||||||
proc getMicrosecondTime*[T](timeInSeconds: T): Timestamp =
|
proc getMicrosecondTime*[T](timeInSeconds: T): Timestamp =
|
||||||
var us = Timestamp(timeInSeconds*1000000)
|
var us = Timestamp(timeInSeconds*1000_000)
|
||||||
return us
|
return us
|
||||||
|
|
||||||
proc getMillisecondTime*[T](timeInSeconds: T): Timestamp =
|
proc getMillisecondTime*[T](timeInSeconds: T): Timestamp =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user