do not log data track stats if not started (#4468)
This commit is contained in:
@@ -89,6 +89,7 @@ func (d *dataTrackStats) Close() {
|
|||||||
|
|
||||||
d.endTime = mono.UnixNano()
|
d.endTime = mono.UnixNano()
|
||||||
|
|
||||||
|
if d.startTime != 0 {
|
||||||
duration := time.Duration(d.endTime - d.startTime).Seconds()
|
duration := time.Duration(d.endTime - d.startTime).Seconds()
|
||||||
fps := float64(d.numFrames) / duration
|
fps := float64(d.numFrames) / duration
|
||||||
|
|
||||||
@@ -102,3 +103,4 @@ func (d *dataTrackStats) Close() {
|
|||||||
"fps", fps,
|
"fps", fps,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user