TimeValue constructor

TimeValue(
  1. {required double duration,
  2. required TimeUnit unit}
)

Creates a new time value object.

Parameters:

  • duration — The duration of the time offset/interval.
  • unit — The unit of the time offset/interval.

Implementation

factory TimeValue({required double duration, required TimeUnit unit}) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_TimeValue_createWithDurationUnit(
        duration, unit.coreValue, errorHandler);
  });
  return TimeValue._withHandle(handle);
}