Revision: 4057
Author: pekka.klarck
Date: Tue Sep 7 12:42:32 2010
Log: clean. up.
http://code.google.com/p/robotframework/source/detail?r=4057
Modified:
/trunk/src/robot/utils/robottime.py
=======================================
--- /trunk/src/robot/utils/robottime.py Tue Sep 7 12:40:08 2010
+++ /trunk/src/robot/utils/robottime.py Tue Sep 7 12:42:32 2010
@@ -206,7 +206,7 @@
format = format.lower()
# 1) Return time in seconds since epoc
if 'epoch' in format:
- return long(time_)
+ return int(time_)
timetuple = time.localtime(time_)
parts = []
for i, match in enumerate(['year','month','day','hour','min','sec']):
@@ -236,7 +236,7 @@
plus/minus the time specified with the time string.
"""
try:
- ret = long(timestr)
+ ret = int(timestr)
if ret < 0:
raise DataError("Epoch time must be positive (got %s)" %
timestr)
return ret
@@ -270,7 +270,7 @@
raise DataError("Invalid timestamp '%s'" % timestamp)
if millis:
return round(secs, 3)
- return long(round(secs))
+ return int(round(secs))
def secs_to_timestamp(secs, seps=None, millis=False):
@@ -307,7 +307,7 @@
def elapsed_time_to_string(elapsed_millis):
"""Converts elapsed time in millisecods to format 'hh:mm:ss.mil'"""
- elapsed_millis = round(elapsed_millis, 0)
+ elapsed_millis = round(elapsed_millis)
if elapsed_millis < 0:
pre = '-'
elapsed_millis = abs(elapsed_millis)