sampo.schemas.time#

Overview#

Classes#

Time

Class for describing all basic operations for working with time in framework

Attributes#

TIME_INF

-

Classes#

class sampo.schemas.time.Time(value: int = 0)#

Bases: sampo.schemas.serializable.AutoJSONSerializable[Time]

Class for describing all basic operations for working with time in framework

Parameters:

value – initial time value

value: int#
static inf()#

Return time, that is obviously longer

__add__(other: 'Time' or int) Time#
__radd__(other: 'Time' or int) Time#
__sub__(other: 'Time' or int) Time#
__rsub__(other: 'Time' or int) Time#
__mul__(other: 'Time' or int) Time#
__rmul__(other: 'Time' or int) Time#
__floordiv__(other: 'Time' or int) Time#
__truediv__(other: 'Time' or int) float#
__lt__(other)#

Return self<value.

__le__(other)#

Return self<=value.

__gt__(other)#

Return self>value.

__ge__(other)#

Return self>=value.

__eq__(other)#

Return self==value.

__bool__()#
__int__() int#
__str__() str#

Return str(self).

__repr__() str#

Return repr(self).

__unicode__() str#
__hash__() int#

Return hash(self).

set_time(value: int)#
is_inf() bool#

Attributes#

sampo.schemas.time.TIME_INF = 2000000000#