Skip to content

Commit

Permalink
[timer] Fixed a parsing bug in timer
Browse files Browse the repository at this point in the history
  • Loading branch information
flabbergastedbd committed Sep 6, 2014
1 parent 236a738 commit 0a920de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions framework/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"""

import math
import datetime


Expand Down Expand Up @@ -60,8 +61,9 @@ def get_elapsed_time(self, offSet='0'):
return datetime.datetime.now() - self.Time[offSet]['start']

def get_time_as_str(self, timedelta):
seconds = timedelta.total_seconds()
miliseconds = timedelta.microseconds/1000
microseconds, seconds = math.modf(timedelta.total_seconds())
seconds = int(seconds)
miliseconds = int(microseconds*1000)
hours = seconds / 3600
seconds -= 3600*hours
minutes = seconds / 60
Expand Down

0 comments on commit 0a920de

Please sign in to comment.