mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-05-23 15:19:26 +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
8ed31ffddb
commit
2f73667a96
@ -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