Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2007-05-24 22:36:56


fanz wrote:
> Sending again because first attempt did not go through...
>
> -----Original Message-----
> From: fanz [mailto:fanzhe_cui_at_[hidden]]
> Sent: Thursday, May 24, 2007 2:39 PM
> To: 'boost-users_at_[hidden]'
> Subject: Looking for boost library for timer callback function
>
> I have been looking for a timer callback function in any boost library. I
> saw something like below by searching on the web:
>
> bool set_timer(time_duration_t fireTime, boost::function<time_duration_t
> ()>);
>
> But it did not give me further clue about which library contains this
> function. I also saw a discussion on the web about using ASIO but the
> document did not let me complete understand it.
>
> Does anyone has info about which library has the function of Timer callback?

You want asio deadline_timer. Here's a reference page and tutorial pages:

http://asio.sourceforge.net/boost_asio_0_3_7/libs/asio/doc/reference/a00105.html
http://asio.sourceforge.net/boost_asio_0_3_7/libs/asio/doc/tutorial/tuttimer1.html

Because asio isn't in 1.34 you'll either need to checkout from the latest CVS
or put the asio distribution on top of 1.34 which works with the 0.3.7 version.

Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net