Gorgon
Show / Hide Table of Contents

Interface IGorgonTimer

Functionality to measure an interval of time.

Namespace: Gorgon.Timing
Assembly: Gorgon.Core.dll
Syntax
public interface IGorgonTimer
Remarks

Timers can be used to set up events that occur during a predefined time period, and/or can be used to measure the amount of time that operation takes to complete.

A timer is closely tied to the operating system, thus a concrete class will be provided by an operating system specific assembly.

Properties

| Edit this page View Source

Days

Property to return the number of days elapsed since the timer was started.

Declaration
double Days { get; }
Property Value
Type Description
double
| Edit this page View Source

Hours

Property to return the number of hours elapsed since the timer was started.

Declaration
double Hours { get; }
Property Value
Type Description
double
| Edit this page View Source

IsHighResolution

Property to return whether this timer has a resolution of less than 1 millisecond or not.

Declaration
bool IsHighResolution { get; }
Property Value
Type Description
bool
| Edit this page View Source

Microseconds

Property to return the number of microseconds elapsed since the timer was started.

Declaration
double Microseconds { get; }
Property Value
Type Description
double
| Edit this page View Source

Milliseconds

Property to return the number of milliseconds elapsed since the timer was started.

Declaration
double Milliseconds { get; }
Property Value
Type Description
double
| Edit this page View Source

Minutes

Property to return the number of minutes elapsed since the timer was started.

Declaration
double Minutes { get; }
Property Value
Type Description
double
| Edit this page View Source

Seconds

Property to return the number of seconds elapsed since the timer was started.

Declaration
double Seconds { get; }
Property Value
Type Description
double
| Edit this page View Source

Ticks

Property to return the number of ticks since the timer was started.

Declaration
long Ticks { get; }
Property Value
Type Description
long

Methods

| Edit this page View Source

Reset()

Function to reset the timer.

Declaration
void Reset()

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author