Constructor CachingClock
CachingClock(IClock)
Creates an instance wrapping the IClock instance specified by innerClock
.
Declaration
public CachingClock(IClock innerClock)
Parameters
Type | Name | Description |
---|---|---|
IClock | innerClock | A IClock instance to use when updating the cached time. |
Remarks
This constructor creates an instance where the current time is cached for at least one second between calls.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
CachingClock(IClock, Int32)
Creates an instance wrapping the IClock instance specified by innerClock
.
Declaration
public CachingClock(IClock innerClock, int cacheIntervalMilliseconds)
Parameters
Type | Name | Description |
---|---|---|
IClock | innerClock | A IClock instance to use when updating the cached time. |
System.Int32 | cacheIntervalMilliseconds | The length of time, in milliseconds, to cache the time for. A value of zero is allowed and will effectively disable caching. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |