Package haizea :: Package core :: Module manager :: Class Clock
[hide private]
[frames] | no frames]

Class Clock

source code


Base class for the resource manager's clock.

The clock is in charge of periodically waking the resource manager so it will process new requests and handle existing reservations. This is a base class defining abstract methods.

Instance Methods [hide private]
 
__init__(self, manager)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
get_time(self)
Return the current time
source code
 
get_start_time(self)
Return the time at which the clock started ticking
source code
 
get_next_schedulable_time(self)
Return the next time at which resources could be scheduled.
source code
 
run(self)
Start and run the clock.
source code
 
stop(self)
Stop the clock.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, manager)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

get_next_schedulable_time(self)

source code 

Return the next time at which resources could be scheduled.

The "next schedulable time" server sanity measure when running in real time (to avoid scheduling something "now" to actually have "now" be in the past once the scheduling function returns. i.e., the "next schedulable time" has nothing to do with whether there are resources available at that time or not.

run(self)

source code 

Start and run the clock. This function is, in effect, the main loop of the resource manager.

stop(self)

source code 

Stop the clock.

Stopping the clock makes Haizea exit.