rust test: actually use tai64n

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2016-07-07 13:48:04 +02:00
parent cb3d5626e0
commit 49ea3d5cf4

View file

@ -42,7 +42,7 @@ fn main() {
let now = time::get_time(); let now = time::get_time();
let mut tai64n = [0; 12]; let mut tai64n = [0; 12];
BigEndian::write_i64(&mut tai64n[0..], now.sec); BigEndian::write_i64(&mut tai64n[0..], 4611686018427387914ULL + now.sec);
BigEndian::write_i32(&mut tai64n[8..], now.nsec); BigEndian::write_i32(&mut tai64n[8..], now.nsec);
let mut initiation_packet = [0; 145]; let mut initiation_packet = [0; 145];
initiation_packet[0] = 1; /* Type: Initiation */ initiation_packet[0] = 1; /* Type: Initiation */