Object for measuring the time needed by the various tasks, methods, etc.
The object, in particular, supports nested operations that call each other
and correctly measures the time spent in each of the operations.
The current implementation of the timer is not thread-safe;
if we detect that the class is used from multiple threads
we disable time measurements altogether. Calls are still counted.