Fix time calculation.
This commit is contained in:
committed by
GitHub
parent
002f0f800b
commit
757153fde0
@@ -10,9 +10,9 @@ def hhmmss(ms):
|
|||||||
# s = 1000
|
# s = 1000
|
||||||
# m = 60000
|
# m = 60000
|
||||||
# h = 360000
|
# h = 360000
|
||||||
h, r = divmod(ms, 36000)
|
s = round(ms / 1000)
|
||||||
m, r = divmod(r, 60000)
|
m, s = divmod(s, 60)
|
||||||
s, _ = divmod(r, 1000)
|
h, m = divmod(m, 60)
|
||||||
return ("%d:%02d:%02d" % (h,m,s)) if h else ("%d:%02d" % (m,s))
|
return ("%d:%02d:%02d" % (h,m,s)) if h else ("%d:%02d" % (m,s))
|
||||||
|
|
||||||
class ViewerWindow(QMainWindow):
|
class ViewerWindow(QMainWindow):
|
||||||
|
|||||||
Reference in New Issue
Block a user