Noda Time
Show / Hide Table of Contents

Class SystemClock

Singleton implementation of IClock which reads the current system time. It is recommended that for anything other than throwaway code, this is only referenced in a single place in your code: where you provide a value to inject into the rest of your application, which should only depend on the interface.
Since 1.0.x
Availability net35-Client
Inheritance
Object
SystemClock
Implements
IClock
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: NodaTime
Assembly: NodaTime.dll
Syntax
public sealed class SystemClock : IClock

Fields

Instance

The singleton instance of SystemClock.
Since 1.0.x
Availability net35-Client
Declaration
public static readonly SystemClock Instance
Field Value
Type Description
SystemClock The singleton instance of SystemClock.

Properties

Now

Gets the current time as an Instant.
Since 1.0.x
Availability net35-Client
Declaration
public Instant Now { get; }
Property Value
Type Description
Instant The current time in ticks as an Instant.

Implements

IClock
In this article
Back to top Generated by DocFX