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 provides functions to manage a ticking clock based on a time period as well as retrieve the current tick’s date since the start date.


Get the clock’s current datetime.

Returns:The datetime.

Get the datetime at a given period.

Parameters:period – The index of the period.
Returns:The datetime.

Resets the clock’s timestep index to ‘0’.


Increment the clock’s timestep index.

class auxi.core.time.TimePeriod

Bases: enum.Enum

Represents a period in time.

day = 5
hour = 4
millisecond = 1
minute = 3
month = 7
second = 2
week = 6
year = 8