Skip to content
Snippets Groups Projects
Commit 834f9e36 authored by Jono Wenger's avatar Jono Wenger
Browse files

Add debug print to group timestamp

parent cfeb9748
Branches
Tags
1 merge request!67Release
...@@ -9,10 +9,12 @@ package bindings ...@@ -9,10 +9,12 @@ package bindings
import ( import (
"github.com/pkg/errors" "github.com/pkg/errors"
jww "github.com/spf13/jwalterweatherman"
gc "gitlab.com/elixxir/client/groupChat" gc "gitlab.com/elixxir/client/groupChat"
gs "gitlab.com/elixxir/client/groupChat/groupStore" gs "gitlab.com/elixxir/client/groupChat/groupStore"
"gitlab.com/elixxir/crypto/group" "gitlab.com/elixxir/crypto/group"
"gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/id"
"time"
) )
// GroupChat object contains the group chat manager. // GroupChat object contains the group chat manager.
...@@ -291,9 +293,10 @@ func (gmr *GroupMessageReceive) GetTimestampNano() int64 { ...@@ -291,9 +293,10 @@ func (gmr *GroupMessageReceive) GetTimestampNano() int64 {
// GetTimestampMS returns the message timestamp in milliseconds. // GetTimestampMS returns the message timestamp in milliseconds.
func (gmr *GroupMessageReceive) GetTimestampMS() int64 { func (gmr *GroupMessageReceive) GetTimestampMS() int64 {
ts := gmr.Timestamp.UnixNano() ts := uint64(gmr.Timestamp.UnixNano()) / uint64(time.Millisecond)
ts = (ts + 500000) / 1000000 tsInt64 := int64(ts)
return ts jww.INFO.Printf("TimestampMS: %d", tsInt64)
return tsInt64
} }
// GetRoundID returns the ID of the round the message was sent on. // GetRoundID returns the ID of the round the message was sent on.
...@@ -310,7 +313,8 @@ func (gmr *GroupMessageReceive) GetRoundTimestampNano() int64 { ...@@ -310,7 +313,8 @@ func (gmr *GroupMessageReceive) GetRoundTimestampNano() int64 {
// GetRoundTimestampMS returns the timestamp, in milliseconds, of the round the // GetRoundTimestampMS returns the timestamp, in milliseconds, of the round the
// message was sent on. // message was sent on.
func (gmr *GroupMessageReceive) GetRoundTimestampMS() int64 { func (gmr *GroupMessageReceive) GetRoundTimestampMS() int64 {
ts := gmr.RoundTimestamp.UnixNano() ts := uint64(gmr.RoundTimestamp.UnixNano()) / uint64(time.Millisecond)
ts = (ts + 500000) / 1000000 tsInt64 := int64(ts)
return ts jww.INFO.Printf("RoundTimestampMS: %d", tsInt64)
return tsInt64
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment