a tiny timer for statistics of cpp function