Class AtomicMonotonicWinApiTimestampGenerator
A timestamp generator that guarantees monotonically increasing timestamps among all client threads and logs warnings when timestamps drift in the future, using Win API high precision GetSystemTimePreciseAsFileTime() method call available in Windows 8+ and Windows Server 2012+.
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Dse
Assembly: Dse.dll
Syntax
public class AtomicMonotonicWinApiTimestampGenerator : AtomicMonotonicTimestampGenerator, ITimestampGenerator
Constructors
AtomicMonotonicWinApiTimestampGenerator(Int32, Int32)
Creates a new instance of AtomicMonotonicTimestampGenerator.
Declaration
public AtomicMonotonicWinApiTimestampGenerator(int warningThreshold = 1000, int minLogInterval = 1000)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | warningThreshold | Determines how far in the future timestamps are allowed to drift before a warning is logged, expressed
in milliseconds. Default: |
System.Int32 | minLogInterval | In case of multiple log events, it determines the time separation between log events, expressed in
milliseconds. Use 0 to disable. Default: |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException |
Methods
GetTimestamp()
Declaration
protected override sealed long GetTimestamp()
Returns
Type | Description |
---|---|
System.Int64 |