v1.0.0-rc.2
Pre-release-
Added
ActiveTimers
property toManualTimeProvider
. The property will display the number of currently active timers that have a callback scheduled to be called in the future. -
Allow
ManualTimeProvider.Start
to be set using property initializers. -
Made the timer type created by
ManualTimeProvider
, theManualTimer
type, public, and introduced a protected methodCreateManualTimer
onManualTimeProvider
. This enables advanced scenarios where a customManualTimer
is needed.A custom implementation of
ManualTimer
can override theChange
method and add custom behavior to it.Overriding
CreateManualTimer
makes it possible to intercept aTimerCallback
and perform actions before and after the timer callback has been invoked. -
Replace the
AutoAdvanceAmount
property with theAutoAdvanceBehavior
property onManualTimeProvider
, and introduce theAutoAdvanceBehavior
type. To automatically advance the time whenGetUtcNow()
orGetLocalNow()
is called, setAutoAdvanceBehavior.UtcNowAdvanceAmount
to aTimeSpan
larger than zero. -
Enable auto advance feature for
GetTimestamp()
andGetElapsedTime(long)
. To automatically advance the time whenGetTimestamp()
orGetElapsedTime(long)
is called, setAutoAdvanceBehavior.TimestampAdvanceAmount
to aTimeSpan
larger than zero. -
ManualTimer
now exposes its current configuration.DueTime
,Period
,IsActive
,CallbackTime
, andCallbackInvokeCount
are now publicly visible. -
Enable auto-advance feature for timers. This enables automatically calling timers callback a specified number of times, by setting the
AutoAdvanceBehavior.TimerAutoTriggerCount
property to a number larger than zero.
Full Changelog: v1.0.0-rc.1...v1.0.0-rc.2