libmuscle.timestamp module

class libmuscle.timestamp.Timestamp(seconds: float | None = None)[source]

Bases: object

A timestamp, as the number of seconds since the UNIX epoch.

Parameters:

seconds – The number of seconds since the start of 1970.

to_asctime() str[source]

Converts a Timestamp to a LogRecord asctime.

Returns:

The timestamp as a string in the format used by default by Python’s logging subsystem.