Class Clock
Time related helper.
Inherited Members
Namespace:CacheManager.Core.Utility
Assembly:CacheManager.Core.dll
Syntax
public static class Clock
Fields
| Improve this Doc View SourceTicksPerMillisecond
Number of ticks per millisecond.
Declaration
public const long TicksPerMillisecond = 10000L
Field Value
Type | Description |
---|---|
Int64 |
UnixEpochSeconds
Seconds since 1970.
Declaration
public const long UnixEpochSeconds = 62135596800L
Field Value
Type | Description |
---|---|
Int64 |
UnixEpochTicks
Ticks since 1970.
Declaration
public const long UnixEpochTicks = 621355968000000000L
Field Value
Type | Description |
---|---|
Int64 |
Methods
| Improve this Doc View SourceGetUnixTimestampMillis()
Computes a timestamp representing milliseconds since 1970.
Declaration
public static long GetUnixTimestampMillis()
Returns
Type | Description |
---|---|
Int64 | The milliseconds. |
GetUnixTimestampTicks()
Computes a timestamp representing ticks since 1970.
Declaration
public static long GetUnixTimestampTicks()
Returns
Type | Description |
---|---|
Int64 | The ticks. |
ToUnixTimestampMillis(DateTime)
Computes the milliseconds since 1970 up to the given date.
Declaration
public static long ToUnixTimestampMillis(DateTime date)
Parameters
Type | Name | Description |
---|---|---|
DateTime | date | The DateTime base. |
Returns
Type | Description |
---|---|
Int64 | The milliseconds since 1970. |