libroi offers 2 functions in a shared library which can be used to mark and time sections of a C / C++ program.