[LDTP-Dev] [Bug 415160] getElapsedTime counts mistaken time.

LDTP (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Mar 6 01:11:52 PST 2007


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=415160

  LDTP | ldtprunner | Ver: 0.8.x





------- Comment #1 from lavi  2007-03-06 09:09 UTC -------
Sorry, fixed again.

def getElapsedTime (_endTime, _startTime):
    timeDiff = _endTime - _startTime
    minbaseon = 60
    hourbaseon = minbaseon*60
    daybaseon = hourbaseon*24
    days = int (timeDiff / daybaseon)
    hours = int ((timeDiff - days*daybaseon) / hourbaseon)
    seconds = int (timeDiff  - days*daybaseon - hours*hourbaseon)
    minutes = int (seconds / minbaseon)
    seconds = int (seconds - minutes*minbaseon)

    return ('%s day(s) %s:%s:%s' %
           (str (days), str (hours), str (minutes), str (seconds)))


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email


More information about the LDTP-dev mailing list