Perform sec to msec upconversion before first printout

pull/987/head
Andreas Baulig 1 year ago
parent d158c2776e
commit fa66bf0160
No known key found for this signature in database
GPG Key ID: 5225DCE5A4A2EE20
  1. 7
      rescuesdriq/rescuesdriq.go

@ -130,6 +130,11 @@ func main() {
// make a read buffer
reader := bufio.NewReader(fi)
var headerOrigin HeaderStd = analyze(reader)
if !*assumeMilliseconds {
headerOrigin.StartTimestamp = headerOrigin.StartTimestamp * (int64(time.Second) / int64(time.Millisecond))
}
printHeader(&headerOrigin)
if flagSeen["out"] {
@ -157,8 +162,6 @@ func main() {
}
} else if *timeNow {
headerOrigin.StartTimestamp = int64(time.Now().UnixNano() / int64(time.Millisecond))
} else if !*assumeMilliseconds {
headerOrigin.StartTimestamp = headerOrigin.StartTimestamp * (int64(time.Second) / int64(time.Millisecond))
}
fmt.Println("\nHeader is now")

Loading…
Cancel
Save