e) start/stop the timer: wrap the sections of your code for timing
d) start/stop the timer: wrap the sections of your code for timing
.. code-block:: C
...
...
@@ -143,13 +136,13 @@ e) start/stop the timer: wrap the sections of your code for timing
[…]
ftimings_stop(timer, "section1");
f) print the measured times
e) print the measured times
.. code-block:: C
ftimings_print(timer, 0.0);
g) destroy the ``ftimer_t`` object
f) destroy the ``ftimer_t`` object
.. code-block:: C
...
...
@@ -333,6 +326,24 @@ Thresholds
Additionally, sometimes one is not overly concerned with many sections that cover only a short time duration. It is possible to exclude those by passing the optional argument threshold to the ``%print()`` method of ``timer_t``. Then, all child sections that took less than that threshold are subsumed under a single entry node (below threshold) and are not shown individually. That way the printed tree is still consistent in that all child nodes' values sum up to their parent's total, but unimportant nodes can be hidden.
***************
Error handling
***************
Optionally, you can have a custom error handling function for ftimings. This function can be as simple as: