Skip to content

perfCounter

perfCounter(): number

Defined in: packages/pythonlib/src/time.ts:100

Return the value of a performance counter (monotonic clock). Uses performance.now() for high precision.

Returns

number

Seconds as a float (relative to an undefined reference point)

Example

const start = perfCounter()
// ... do work ...
const elapsed = perfCounter() - start