SystemTime.parse constructor

SystemTime.parse(
  1. ByteData data_
)

Implementation

factory SystemTime.parse(ByteData data_) {
  if (data_.lengthInBytes < SystemTime.mavlinkEncodedLength) {
    var len = SystemTime.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var timeUnixUsec = data_.getUint64(0, Endian.little);
  var timeBootMs = data_.getUint32(8, Endian.little);

  return SystemTime(timeUnixUsec: timeUnixUsec, timeBootMs: timeBootMs);
}