roboto.time#
Module Contents#
- roboto.time.MAX_32BIT_EPOCH_SECONDS = 2147483647#
- roboto.time.NSEC_PER_SEC = 1000000000#
- type roboto.time.Time = Union[int, decimal.Decimal, str, datetime.datetime]#
- roboto.time.to_epoch_nanoseconds(value)#
Takes a time value in any of the following formats, and converts it to unix epoch nanoseconds:
datetime.datetime
int: Unix epoch nanoseconds
str: ROS formatted timestamp in the form of “<sec>.<nsec>”
decimal.Decimal: ROS formatted timestamp in the form of decimal.Decimal(“<sec>.<nsec>”)
- Parameters:
value (Time)
- roboto.time.utcnow()#
Return timezone aware datetime.datetime object, now in UTC.
- Return type:
datetime.datetime