validateCsafeTime function

Validator validateCsafeTime()

Shortcut for a validator to assert that the data represents a CsafeTime

Implementation

Validator validateCsafeTime() {
  return validate(
      (bytes) => bytes.byteLength == 3 || bytes is Duration,
      (bytes) => ArgumentError(
          "Provided time value is not a Duration or 3-byte data field"));
}