Misc::Timer check_timer; check_timer.Start(); BOOST_SCOPE_EXIT( (check_timer) ) { check_timer.Stop(); } BOOST_SCOPE_EXIT_END