1
0
Fork 0
firefox/toolkit/components/telemetry/docs/collection/measuring-time.rst
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

13 lines
514 B
ReStructuredText

======================
Measuring elapsed time
======================
To make it easier to measure how long operations take, we have helpers for C++.
These helpers record the elapsed time into histograms, so you have to create suitable :doc:`histograms` for them first.
API:
.. code-block:: cpp
void AccumulateTimeDelta(HistogramID id, TimeStamp start, TimeStamp end = TimeStamp::Now());
void AccumulateTimeDelta(HistogramID id, const nsCString& key, TimeStamp start, TimeStamp end = TimeStamp::Now());