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:
Sanaz Taheri Boshrooyeh 2022-03-07 07:56:39 -08:00 committed by GitHub
parent 8ed31ffddb
commit 2f73667a96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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 =