Skip to content

PerformanceTimer Class ​

Definition ​

Represents a simple stopwatch that can be used to measure elapsed time.

  • Namespace: JASE.Performance
  • Assembly: JASE.dll

Constructors ​

NameDescription
PerformanceTimer(bool start = null)Initializes a new instance of the PerformanceTimer class.

Properties ​

NameDescription
ElapsedGets the elapsed time, in milliseconds, since the stopwatch was started or restarted.
EndTicksGets the ticks of the end time.
EndTimeGets the end time of the stopwatch.
StartTicksGets the ticks of the start time.
StartTimeGets the start time of the stopwatch.

Methods ​

NameDescription
TimeSpan CalculateTime()Calculates the elapsed time since the stopwatch was started or restarted.
bool IsRunning()Checks if PerformanceTimer is actively running
void Restart()Restarts the performance timer
void Start()Starts the performance timer
void Stop()Stops the performance timer
string ToString()