Wanzyee Studio
UniqueTimestamp

UTC timestamp that unique in current process. More...

Public Member Functions

 UniqueTimestamp ()
 Create a unique timestamp that closes to now in current process. More...
 

Static Public Member Functions

static void AtLeast (DateTime value)
 Check to extend the min timestamp at least equals or greater than the specified time. More...
 
static implicit operator DateTime (UniqueTimestamp timestamp)
 Convert the specified timestamp to System.DateTime. More...
 

Public Attributes

readonly DateTime time
 The time. More...
 

Static Public Attributes

static DateTime now => new UniqueTimestamp()
 Create a unique timestamp that closes to now in current process. More...
 

Detailed Description

UTC timestamp that unique in current process.

Simple and clear programming, convenient conversion:

DateTime timestamp = new UniqueTimestamp();

Constructor & Destructor Documentation

Create a unique timestamp that closes to now in current process.

Member Function Documentation

static void AtLeast ( DateTime  value)
static

Check to extend the min timestamp at least equals or greater than the specified time.

Parameters
valueThe min time.
static implicit operator DateTime ( UniqueTimestamp  timestamp)
static

Convert the specified timestamp to System.DateTime.

Parameters
timestampTimestamp.
Returns
Time.

Member Data Documentation

readonly DateTime time

The time.

DateTime now => new UniqueTimestamp()
static

Create a unique timestamp that closes to now in current process.