plcopen/plcopen.py
changeset 2437 105c20fdeb19
parent 2432 dbc065a2f7a5
child 2439 f0a040f1de1b
--- a/plcopen/plcopen.py	Fri Oct 05 13:48:54 2018 +0300
+++ b/plcopen/plcopen.py	Fri Oct 05 14:22:01 2018 +0300
@@ -25,6 +25,7 @@
 
 
 from __future__ import absolute_import
+from __future__ import division
 from types import *
 import re
 from collections import OrderedDict
@@ -262,9 +263,9 @@
                                 text += "%ds" % time_values[2]
                             if time_values[3] != 0:
                                 if time_values[3] % 1000 != 0:
-                                    text += "%.3fms" % (float(time_values[3]) / 1000)
+                                    text += "%.3fms" % (time_values[3] / 1000)
                                 else:
-                                    text += "%dms" % (time_values[3] / 1000)
+                                    text += "%dms" % (time_values[3] // 1000)
                             task.set("interval", text)
 
                 # Update resources pou instance attributes