getTime method

Future<DateTime> getTime()
inherited

Retrieves the current time from the device.

Throws ZKErrorResponse if the operation fails.

Implementation

Future<DateTime> getTime() async {
  final response = await sendCommand(CMD_GET_TIME);
  final data = ByteData.sublistView(response, 8);
  final t = data.getUint32(0, Endian.little);
  return decodeTime(t);
}