API ReferenceSandbox.Diagnostics

FastTimerclass

A lightweight, high-resolution timer for performance measurement. More efficient than `System.Diagnostics.Stopwatch` with a simpler API.

objectFastTimer
Namespace
Sandbox.Diagnostics
Assembly
Sandbox.System
Declaration
public sealed struct Sandbox.Diagnostics.FastTimer

Methods2

Showing 2 methods

public void Start()PUBLIC

Starts or restarts the timer.

Returns:void

public static Sandbox.Diagnostics.FastTimer StartNew()PUBLICSTATIC

Creates and starts a new FastTimer.

Returns:FastTimerA started FastTimer

Properties6

Showing 6 properties

public System.TimeSpan Sandbox.Diagnostics.FastTimer.Elapsed { get; set; }PUBLICGETSET

Gets the time elapsed since the timer was started as a TimeSpan.

Returns:TimeSpan

public double Sandbox.Diagnostics.FastTimer.ElapsedMicroSeconds { get; set; }PUBLICGETSET

Gets the number of microseconds elapsed since the timer was started.

Returns:double

public double Sandbox.Diagnostics.FastTimer.ElapsedMilliSeconds { get; set; }PUBLICGETSET

Gets the number of milliseconds elapsed since the timer was started.

Returns:double

public double Sandbox.Diagnostics.FastTimer.ElapsedSeconds { get; set; }PUBLICGETSET

Gets the number of seconds elapsed since the timer was started.

Returns:double

public long Sandbox.Diagnostics.FastTimer.ElapsedTicks { get; set; }PUBLICGETSET

Gets the number of ticks elapsed since the timer was started.

Returns:long

public long Sandbox.Diagnostics.FastTimer.StartTick { get; set; }PUBLICGETSET

Gets the timestamp when the timer was started.

Returns:long

On this page