
I checked asio timer before, when I was looking for boost timer library. The smallest time granularity of asio::deadlime_timer is second. I did not find any example or document of asio that mentioned about smaller granularity. ++++++++++++++++++++++++++++++++++++ Goldiom Systems LLC - Information and Communication Technology Provider Email: fanzhe.cui@goldiom.com Tel: 973-210-4254 www.goldiom.com From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Sergey Nikulov Sent: Monday, June 18, 2007 1:16 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] How to create a timer in boost::thread You can check boost::asio (http://asio.sourceforge.net/) Here you can find pretty simple examples for boost::asio::deadline_timer which is (I think so) answer on both of your questions. HTH, Sergey 2007/6/17, Meryl Silverburgh <silverburgh.meryl@gmail.com>: Hi, Can you please tell me if i can do this with boost::thread library? 1. create a timer (say 5 seconds) which execute a function in a different thread when it expires. 2. the creator can cancel the timer before it expires. Thank you. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users