mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 05:11:21 +00:00
time in nanoseconds
This commit is contained in:
@ -8,10 +8,10 @@ import (
|
||||
// Time
|
||||
|
||||
func WriteTime(w io.Writer, t time.Time, n *int64, err *error) {
|
||||
WriteInt64(w, t.Unix(), n, err)
|
||||
WriteInt64(w, t.UnixNano(), n, err)
|
||||
}
|
||||
|
||||
func ReadTime(r io.Reader, n *int64, err *error) time.Time {
|
||||
t := ReadInt64(r, n, err)
|
||||
return time.Unix(t, 0)
|
||||
return time.Unix(0, t)
|
||||
}
|
||||
|
Reference in New Issue
Block a user