Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CounterTiming

Callback object returned by ICounters.beginTiming to end timing of execution block and update the associated counter.

Example

let timing = counters.beginTiming("mymethod.exec_time");
try {
    ...
} finally {
    timing.endTiming();
}

Hierarchy

  • CounterTiming

Index

Constructors

Methods

Constructors

constructor

  • Creates a new instance of the timing callback object.

    Parameters

    • Default value counter: string = null

      an associated counter name

    • Default value callback: ICounterTimingCallback = null

      a callback that shall be called when endTiming is called.

    Returns CounterTiming

Methods

endTiming

  • endTiming(): void
  • Ends timing of an execution block, calculates elapsed time and updates the associated counter.

    Returns void

Generated using TypeDoc