graphics/DebugDataConsumer.py
changeset 2459 21164625b393
parent 2437 105c20fdeb19
child 3750 f62625418bff
--- a/graphics/DebugDataConsumer.py	Fri Nov 23 11:01:20 2018 +0100
+++ b/graphics/DebugDataConsumer.py	Fri Nov 23 12:13:24 2018 +0100
@@ -24,6 +24,7 @@
 
 
 from __future__ import absolute_import
+from __future__ import division
 import datetime
 
 
@@ -76,10 +77,10 @@
     not_null = False
 
     for val, format in [
-            (int(microseconds) / DAY, "%dd"),                 # Days
-            ((int(microseconds) % DAY) / HOUR, "%dh"),        # Hours
-            ((int(microseconds) % HOUR) / MINUTE, "%dm"),     # Minutes
-            ((int(microseconds) % MINUTE) / SECOND, "%ds")]:  # Seconds
+            (int(microseconds) // DAY, "%dd"),                 # Days
+            ((int(microseconds) % DAY) // HOUR, "%dh"),        # Hours
+            ((int(microseconds) % HOUR) // MINUTE, "%dm"),     # Minutes
+            ((int(microseconds) % MINUTE) // SECOND, "%ds")]:  # Seconds
 
         # Add value to TIME literal if value is non-null or another non-null
         # value have already be found
@@ -128,9 +129,9 @@
     data = "TOD#"
 
     for val, format in [
-            (int(microseconds) / HOUR, "%2.2d:"),               # Hours
-            ((int(microseconds) % HOUR) / MINUTE, "%2.2d:"),    # Minutes
-            ((int(microseconds) % MINUTE) / SECOND, "%2.2d."),  # Seconds
+            (int(microseconds) // HOUR, "%2.2d:"),               # Hours
+            ((int(microseconds) % HOUR) // MINUTE, "%2.2d:"),    # Minutes
+            ((int(microseconds) % MINUTE) // SECOND, "%2.2d."),  # Seconds
             (microseconds % SECOND, "%6.6d")]:                  # Microseconds
 
         # Add value to TIME_OF_DAY literal