|
Boost Users : |
Subject: Re: [Boost-users] [boost][asio] deadline_timer doesn't delays -async_wait invokes handler at once
From: tomasz jankowski (tomasz_jacek_at_[hidden])
Date: 2009-01-30 02:54:28
boost::asio::deadline_timer
timer(socket_.io_service(),boost::posix_time::seconds(5));
timer.async_wait(boost::bind(set_result, &timer_result, _1));
Does it work if you rewrite it as follows?
boost::asio::deadline_timer timer(socket_.io_service());
timer.expires_from_now(boost::posix_time::seconds(5));
timer.async_wait(boost::bind(set_result, &timer_result, _1));
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