deploy: 988453f287313d3b4461c61140e7dbb97504965b

This commit is contained in:
jm-clius 2022-03-18 10:36:27 +00:00
parent c9065e020e
commit ec93e29d7e
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ suite "Message Store":
t1 = getNanosecondTime(epochTime())
t2 = getNanosecondTime(epochTime())
t3 = getNanosecondTime(high(float64))
t3 = high(int64)
var msgs = @[
WakuMessage(payload: @[byte 1, 2, 3], contentTopic: topic, version: uint32(0), timestamp: t1),
WakuMessage(payload: @[byte 1, 2, 3, 4], contentTopic: topic, version: uint32(1), timestamp: t2),

View File

@ -9,15 +9,15 @@ type Timestamp* = int64
const TIMESTAMP_TABLE_TYPE* = "INTEGER"
proc getNanosecondTime*[T](timeInSeconds: T): Timestamp =
var ns = Timestamp(timeInSeconds*1000_000_000)
var ns = Timestamp(timeInSeconds.int64 * 1000_000_000.int64)
return ns
proc getMicrosecondTime*[T](timeInSeconds: T): Timestamp =
var us = Timestamp(timeInSeconds*1000_000)
var us = Timestamp(timeInSeconds.int64 * 1000_000.int64)
return us
proc getMillisecondTime*[T](timeInSeconds: T): Timestamp =
var ms = Timestamp(timeInSeconds*1000)
var ms = Timestamp(timeInSeconds.int64 * 1000.int64)
return ms
proc column_timestamp*(a1: ptr sqlite3_stmt, iCol: cint): int64 =