Skip to content

Commit

Permalink
[run_function_at_given_time_every_day.cpp]: update
Browse files Browse the repository at this point in the history
  • Loading branch information
chenrushan committed Sep 2, 2016
1 parent 2232c3f commit d4a1b74
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cpp/run_function_at_given_time_every_day.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class RunEverydayTimer {

using cb_func_t = std::function<void()>;
RunEverydayTimer(io_service_t *io_service, cb_func_t func)
: io_service_(io_service), timer_(*io_service), cb_func_(func) {
: timer_(*io_service), cb_func_(func) {
timer_.expires_at(get_today_utc_time_at(hms_));
timer_.async_wait(std::bind(&RunEverydayTimer::on_time_out,
this, std::placeholders::_1));
Expand Down Expand Up @@ -51,7 +51,6 @@ class RunEverydayTimer {
}

private:
boost::asio::io_service *io_service_ = nullptr;
boost::asio::deadline_timer timer_;
ptime_t expirationtime_;
cb_func_t cb_func_;
Expand Down

0 comments on commit d4a1b74

Please sign in to comment.