1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 23:55:13 -05:00

Perform sec to msec upconversion before first printout

This commit is contained in:
Andreas Baulig 2021-08-18 21:01:12 +00:00
parent d158c2776e
commit fa66bf0160
No known key found for this signature in database
GPG Key ID: 5225DCE5A4A2EE20

View File

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