go test: actually use TAI64N
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
0e583e8770
commit
cb3d5626e0
|
@ -59,7 +59,7 @@ func main() {
|
||||||
// write handshake initiation packet
|
// write handshake initiation packet
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
tai64n := make([]byte, 12)
|
tai64n := make([]byte, 12)
|
||||||
binary.BigEndian.PutUint64(tai64n[:], uint64(now.Unix()))
|
binary.BigEndian.PutUint64(tai64n[:], 4611686018427387914+uint64(now.Unix()))
|
||||||
binary.BigEndian.PutUint32(tai64n[8:], uint32(now.UnixNano()))
|
binary.BigEndian.PutUint32(tai64n[8:], uint32(now.UnixNano()))
|
||||||
initiationPacket := make([]byte, 5)
|
initiationPacket := make([]byte, 5)
|
||||||
initiationPacket[0] = 1 // Type: Initiation
|
initiationPacket[0] = 1 // Type: Initiation
|
||||||
|
|
Reference in New Issue