projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f75abce
)
New hack.
v2.15.18
author
Carl Hetherington
<cth@carlh.net>
Sun, 8 Sep 2019 00:49:52 +0000
(
01:49
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 8 Sep 2019 00:49:52 +0000
(
01:49
+0100)
hacks/dcp_time_to_tc
[new file with mode: 0755]
patch
|
blob
diff --git a/hacks/dcp_time_to_tc
b/hacks/dcp_time_to_tc
new file mode 100755
(executable)
index 0000000..
bfb3966
--- /dev/null
+++ b/
hacks/dcp_time_to_tc
@@ -0,0
+1,15
@@
+#!/usr/bin/python3
+
+import sys
+
+TICKS = 96000
+
+in_time = int(sys.stdin.readline())
+h = in_time // (TICKS * 60 * 60)
+in_time -= h * (TICKS * 60 * 60)
+m = in_time // (TICKS * 60)
+in_time -= m * (TICKS * 60)
+s = in_time // TICKS
+in_time -= s * TICKS
+
+print('%02d:%02d:%02d' % (h, m, s))