Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class NodaTime.​SystemClock

Assembly: NodaTime

Inheritance: object → SystemClock

Implemented Interfaces

Singleton implementation of <see cref="T:NodaTime.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.

Properties

public static SystemClock
Instance
The singleton instance of <see cref="T:NodaTime.SystemClock" /> .

Methods

public Instant
GetCurrentInstant​()
Gets the current time as an <see cref="T:NodaTime.Instant" /> .
Returns The current time in ticks as an <see cref="T:NodaTime.Instant" /> .
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object