Class PreciseTimestampProvider
Represents a precise provider of Timestamp instances.
public sealed class PreciseTimestampProvider : TimestampProviderBase, ITimestampProvider, IGenerator<Timestamp>, IGenerator
- Inheritance
-
PreciseTimestampProvider
- Implements
- Inherited Members
- Extension Methods
Constructors
PreciseTimestampProvider()
Creates a new PreciseTimestampProvider instance with default PrecisionResetTimeout equal to 1 minute.
public PreciseTimestampProvider()
PreciseTimestampProvider(Duration)
Creates a new PreciseTimestampProvider instance.
public PreciseTimestampProvider(Duration precisionResetTimeout)
Parameters
precisionResetTimeout
DurationPrecision reset timeout. See PrecisionResetTimeout for more information.
Exceptions
- ArgumentOutOfRangeException
When
precisionResetTimeout
is less than 1 tick.
Properties
PrecisionResetTimeout
Represents a reset timeout for the period of precise Timestamp computation. After this period ends, the next returned Timestamp instance will not use the underlying Stopwatch for improved precision and a new timeout will start.
public Duration PrecisionResetTimeout { get; }
Property Value
Methods
GetNow()
Returns the current Timestamp.
public override Timestamp GetNow()