tendermint/binary -> tendermint/wire

This commit is contained in:
Jae Kwon
2015-07-25 15:45:45 -07:00
parent 0ef5c3ad07
commit 3be3647dc8
64 changed files with 371 additions and 371 deletions

17
wire/time.go Normal file
View File

@@ -0,0 +1,17 @@
package wire
import (
"io"
"time"
)
// Time
func WriteTime(t time.Time, w io.Writer, n *int64, err *error) {
WriteInt64(t.UnixNano(), w, n, err)
}
func ReadTime(r io.Reader, n *int64, err *error) time.Time {
t := ReadInt64(r, n, err)
return time.Unix(0, t)
}