Time

class py123d.datatypes.time.TimePoint[source]

Time instance in a time series.

Public Data Attributes:

time_ns

The timepoint in nanoseconds [ns].

time_us

The timepoint in microseconds [μs].

time_ms

The timepoint in milliseconds [ms].

time_s

The timepoint in seconds [s].

Public Methods:

from_ns(t_ns)

Constructs a TimePoint from a value in nanoseconds.

from_us(t_us)

Constructs a TimePoint from a value in microseconds.

from_ms(t_ms)

Constructs a TimePoint from a value in milliseconds.

from_s(t_s)

Constructs a TimePoint from a value in seconds.


classmethod from_ns(t_ns)[source]

Constructs a TimePoint from a value in nanoseconds.

Parameters:

t_ns (int) – Time in nanoseconds.

Return type:

TimePoint

Returns:

TimePoint.

classmethod from_us(t_us)[source]

Constructs a TimePoint from a value in microseconds.

Parameters:

t_us (int) – Time in microseconds.

Return type:

TimePoint

Returns:

TimePoint.

classmethod from_ms(t_ms)[source]

Constructs a TimePoint from a value in milliseconds.

Parameters:

t_ms (float) – Time in milliseconds.

Return type:

TimePoint

Returns:

TimePoint.

classmethod from_s(t_s)[source]

Constructs a TimePoint from a value in seconds.

Parameters:

t_s (float) – Time in seconds.

Return type:

TimePoint

Returns:

TimePoint.

property time_ns: int

The timepoint in nanoseconds [ns].

property time_us: int

The timepoint in microseconds [μs].

property time_ms: float

The timepoint in milliseconds [ms].

property time_s: float

The timepoint in seconds [s].