Boost logo

Boost Users :

Subject: [Boost-users] Boost ASIO steady_timer and date change
From: Sabino Colonna (sabinocolonna_at_[hidden])
Date: 2016-05-06 08:51:09


I'm using a steady_timer to perform an asynchronous wait in the following manner:

boost::asio::io_service io_service;
boost::asio::steady_timer my_timer(io_service);

void onTimeout(const boost::system::error_code& e)
    // Print something


If system 'date' does not change, everything is ok. But if I change 'date' by hand while the timer is running, it expires before 600 seconds (more or less after 5 minutes) and 'onTimeout' is called. With synchronous wait, all is ok.
According to documentation, steady_timer should not be affected by time change.
Which may be the problem?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at