Class RunTimeTracker
Tracks the runtime duration of operations using a Stopwatch.
public class RunTimeTracker
- Inheritance
-
RunTimeTracker
Constructors
- RunTimeTracker(string)
Initializes a new instance of the RunTimeTracker class with the specified name.
Properties
- AverageElapsed
Gets the average elapsed ticks per tracked operation.
- Count
Gets the number of times the tracker has been stopped.
- Items
Gets the list of all RunTimeTracker instances.
- Name
Gets the name of the tracker.
- TotalElapsed
Gets the total elapsed ticks recorded by this tracker.
Methods
- Log(ILogWriter?)
Logs the runtime statistics of all RunTimeTracker instances to the debug output.
- Reset()
Resets the state of the object, clearing any accumulated data and stopping any ongoing operations.
- Start()
Starts the tracker. Returns
trueif started successfully; otherwise,false.
- Stop()
Stops the tracker. Returns
trueif stopped successfully; otherwise,false.