Browse Source

[2225_statistics] use timedelta.total_seconds() instead of redundant computation

Due to the review comment.
Naoki Kambe 12 years ago
parent
commit
31b16f3568
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/lib/python/isc/statistics/counter.py

+ 1 - 2
src/lib/python/isc/statistics/counter.py

@@ -126,8 +126,7 @@ def _stop_timer(start_time, element, spec, identifier):
     the element, which is in seconds between start_time and the
     current time and is float-type."""
     delta = datetime.now() - start_time
-    sec = round(delta.days * 86400 + delta.seconds + \
-                    delta.microseconds * 1E-6, 6)
+    sec = delta.total_seconds()
     _set_counter(element, spec, identifier, sec)
 
 def _concat(*args, sep='/'):