[boost.asio 1.47] : changing host time

Hello, I would like to know if there are any implications with the fact of having a call to settimeofday in order to change the system time while using boost asio (asynchronous timers). The point of calling settimeofday (software is running on a linux box with super user privileges) is to synchronize the system clock with a GPS receiver clock at some point while the io service is already running. Best regards, Mathieu Peyréga

I would like to know if there are any implications with the fact of having a call to settimeofday in order to change the system time while using boost asio (asynchronous timers).
Take a look at the following discussion (and the relevant ticket): http://comments.gmane.org/gmane.comp.lib.boost.user/68115

Thank you for your answer, if I build a time_traits as in "http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/example/timers/tick..." based on boost::chrono::high_resolution_clock which is available and steady on my target platform, this should work is this right ? Regards, Mathieu Peyréga Le 08/08/2011 19:20, Igor R a écrit :
I would like to know if there are any implications with the fact of having a call to settimeofday in order to change the system time while using boost asio (asynchronous timers). Take a look at the following discussion (and the relevant ticket): http://comments.gmane.org/gmane.comp.lib.boost.user/68115
Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Thank you for your answer,
if I build a time_traits as in "http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/example/timers/tick..."
based on boost::chrono::high_resolution_clock
which is available and steady on my target platform, this should work is this right ?
Yes, it seems so (although I never tried it). Also, note that the example itself has several issues: https://svn.boost.org/trac/boost/ticket/5418
participants (2)
-
Igor R
-
Mathieu Peyréga