auxi.core.time module¶
This module provides classes to manage time.
-
class
auxi.core.time.
Clock
(name, description=None, start_datetime=datetime.datetime(1, 1, 1, 0, 0), timestep_period_duration=<TimePeriod.month: 7>, timestep_period_count=1)¶ Bases:
auxi.core.objects.NamedObject
Represents a clock that provices functions to manage a ticking clock based on a time period as well as retreive the current tick’s date since the start date.
-
get_datetime
()¶ Get the clock’s current datetime.
Returns: The datetime.
-
get_datetime_at_period_ix
(ix)¶ Get the datetime at a given period.
Parameters: period – The index of the period. Returns: The datetime.
-
reset
()¶ Resets the clock’s timestep index to ‘0’.
-
tick
()¶ Increment the clock’s timestep index.
-
-
class
auxi.core.time.
TimePeriod
¶ Bases:
enum.Enum
Represents a period in time.