RosTime.fromDateTime constructor

RosTime.fromDateTime(
  1. DateTime dateTime
)

Implementation

factory RosTime.fromDateTime(DateTime dateTime) => RosTime(
    secs: (dateTime.millisecondsSinceEpoch * MSEC_TO_SEC).toInt(),
    nsecs: dateTime.microsecondsSinceEpoch % 1000000 * 1000);