seperate timer from example, switch to boost::thread