See also file common/timer.h
Measuring the time certain parts of an algorithm or the entire algorithm consume will often be of great interest. The STXXL provides build-in time measurement class stxxl::timer which can be used as follows:
#include <stxxl/timer>
stxxl::timer Timer;
Timer.start();
Timer.stop();
STXXL_MSG(",easured time: " << (Timer.seconds()) << " (seconds), " << (Timer.mseconds()) << " (milliseconds), " << (Timer.useconds()) << " (microseconds))
Timer.reset(); // reset clock to zero which allows to run start() again
As an alternative, one can also work on the timestamp itself:
double start = stxxl::timestamp();
double stop = stxxl::timestamp();
STXXL_MSG("measured time: " << (stop - start) << " seconds.");