beremiz

cded8d8a0485
Parents f41dc3829af6
Children b9318fc8f033
fix rounding milliseconds from nanoseconds

example:rounding 299999 ns to 300ms, if division result is an
integer, remainder will be lost, and result will be 299.
--- a/targets/typemapping.py Fri Jan 12 17:56:48 2018 +0300
+++ b/targets/typemapping.py Fri Jan 12 18:33:54 2018 +0300
@@ -54,7 +54,7 @@
def _ttime():
return (IEC_TIME,
- lambda x: td(0, x.s, x.ns/1000),
+ lambda x: td(0, x.s, x.ns/1000.0),
lambda t, x: t(x.days * 24 * 3600 + x.seconds, x.microseconds*1000))