You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
268 B

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)
}