Package DebTorrent :: Variable clock :: Class RelativeTime
[hide private]
[frames] | no frames]

Class RelativeTime

source code

Calculate relative time on Unix systems.

Instance Methods [hide private]
 
__init__(self)
Initialize the time values.
source code
float
get_time(self)
Calculate a non-decreasing time.
source code
call graph 
Instance Variables [hide private]
float offset
the offset to use from the current time values due to any changes made in the clock while the program was running
float time
the last time value measured
Method Details [hide private]

get_time(self)

source code 
call graph 

Calculate a non-decreasing time.

Uses the time() function to calculate non-decreasing time values. Checks to make sure the time values are non-decreasing, and also don't change by more than _MAXFORWARD seconds within a reading. These could occur if the system clock was changed during the running of the program.
Returns: float
the current time