Module unique_ts.

14. UniqueTS

The UniqueTS class can be used to obtain a unique time stamp.

_images/UniqueTS_UseCase1.svg
Example1:

obtain unique time stamps

This example shows that obtaining two time stamps in quick

succession using get_unique_time_ts() guarantees they will be unique.

>>> from scottbrian_utils.unique_ts import UniqueTS, UniqueTStamp
>>> first_time_stamp: UniqueTStamp = UniqueTS.get_unique_ts()
>>> second_time_stamp: UniqueTStamp = UniqueTS.get_unique_ts()
>>> print(second_time_stamp > first_time_stamp)
True
class unique_ts.UniqueTS

Unique Time Stamp class.

classmethod get_unique_ts()

Return a unique time stamp.

Return type:

NewType(UniqueTStamp, float)

Returns:

a unique time stamp