ISimulatorClock
USI.Core
Simulator-neutral access to the simulated clock.
public interface ISimulatorClockMethods
TryGetCurrentFlightElapsedTimeAsync
public Task<USIResult<TimeSpan>> TryGetCurrentFlightElapsedTimeAsync()Gets elapsed time since the current simulated flight was last reset. This timeline is distinct from simulator-process uptime.
TryGetHostClockSynchronizationEnabledAsync
public Task<USIResult<Boolean>> TryGetHostClockSynchronizationEnabledAsync()Gets whether simulated local date and time follow the host system clock instead of an independently selected simulator clock.
TryGetLocalDayOfMonthAsync
public Task<USIResult<Int32>> TryGetLocalDayOfMonthAsync()Gets the simulated location's current day of month from 1 to 31.
TryGetLocalDayOfYearAsync
public Task<USIResult<Int32>> TryGetLocalDayOfYearAsync()Gets the zero-based day of the year at the user aircraft's simulated location. January 1 is day 0; day 365 is possible in a leap year.
TryGetLocalMonthAsync
public Task<USIResult<Int32>> TryGetLocalMonthAsync()Gets the simulated location's current month from 1 (January) to 12.
TryGetLocalTimeOfDayAsync
public Task<USIResult<TimeSpan>> TryGetLocalTimeOfDayAsync()Gets the local time of day at the user aircraft's simulated location.
TryGetLocalTimeOffsetFromZuluAsync
public Task<USIResult<TimeSpan>> TryGetLocalTimeOffsetFromZuluAsync()Gets the simulated location's signed local-time offset from Zulu. Add this value to Zulu time to obtain local time.
TryGetLocalYearAsync
public Task<USIResult<Int32>> TryGetLocalYearAsync()Gets the current four-digit year at the simulated location.
TryGetSimulatorSessionElapsedTimeAsync
public Task<USIResult<TimeSpan>> TryGetSimulatorSessionElapsedTimeAsync()Gets elapsed real execution time since the current simulator process session began.
TryGetTimerElapsedTimeAsync
public Task<USIResult<TimeSpan>> TryGetTimerElapsedTimeAsync()Gets elapsed time accumulated by the independent user timer.
TryGetTimerRunningAsync
public Task<USIResult<Boolean>> TryGetTimerRunningAsync()Gets whether the simulator's independent user timer is running.
TryGetZuluDayOfMonthAsync
public Task<USIResult<Int32>> TryGetZuluDayOfMonthAsync()Gets the current Zulu day of month from 1 to 31.
TryGetZuluDayOfYearAsync
public Task<USIResult<Int32>> TryGetZuluDayOfYearAsync()Gets the zero-based day of the year in Zulu (UTC) time. January 1 is day 0; day 365 is possible in a leap year.
TryGetZuluMonthAsync
public Task<USIResult<Int32>> TryGetZuluMonthAsync()Gets the current Zulu month from 1 (January) to 12.
TryGetZuluSunriseTimeOfDayAsync
public Task<USIResult<TimeSpan>> TryGetZuluSunriseTimeOfDayAsync()Gets today's provider-calculated sunrise time in Zulu.
TryGetZuluSunsetTimeOfDayAsync
public Task<USIResult<TimeSpan>> TryGetZuluSunsetTimeOfDayAsync()Gets today's provider-calculated sunset time in Zulu.
TryGetZuluTimeOfDayAsync
public Task<USIResult<TimeSpan>> TryGetZuluTimeOfDayAsync()Gets the current Zulu (UTC) time of day. The value is always within zero inclusive and 24 hours exclusive.
TryGetZuluYearAsync
public Task<USIResult<Int32>> TryGetZuluYearAsync()Gets the current four-digit Zulu calendar year.
TrySetHostClockSynchronizationEnabledAsync
public Task<USIResult> TrySetHostClockSynchronizationEnabledAsync(bool enabled)Enables or disables synchronization of simulated local date and time with the host system clock.
TrySetLocalDayOfYearAsync
public Task<USIResult> TrySetLocalDayOfYearAsync(int zeroBasedDayOfYear)Sets the zero-based day of year at the user aircraft's simulated location when the provider offers a local-calendar control.
TrySetTimerElapsedTimeAsync
public Task<USIResult> TrySetTimerElapsedTimeAsync(TimeSpan elapsedTime)Sets elapsed time on the independent user timer.
TrySetTimerRunningAsync
public Task<USIResult> TrySetTimerRunningAsync(bool running)Starts or stops the simulator's independent user timer.
TrySetZuluDayOfYearAsync
public Task<USIResult> TrySetZuluDayOfYearAsync(int zeroBasedDayOfYear)Sets the zero-based Zulu day of year. January 1 is day 0; day 365 is accepted for leap-year simulation dates.
TrySetZuluTimeOfDayAsync
public Task<USIResult> TrySetZuluTimeOfDayAsync(TimeSpan timeOfDay)Sets Zulu (UTC) time of day at whole-minute precision. The value must be within zero inclusive and 24 hours exclusive.
TrySetZuluYearAsync
public Task<USIResult> TrySetZuluYearAsync(int year)Sets the current four-digit Zulu calendar year when supported.
