wesnothd: convert stray member to seconds
This commit is contained in:
parent
b8747c37b0
commit
98f0d3721c
2 changed files with 3 additions and 3 deletions
|
@ -554,7 +554,7 @@ void server::load_config()
|
|||
dummy_user.set_attr_dup("status", "lobby");
|
||||
}
|
||||
if(cfg_["dummy_player_timer_interval"].to_int() > 0) {
|
||||
dummy_player_timer_interval_ = cfg_["dummy_player_timer_interval"].to_int();
|
||||
dummy_player_timer_interval_ = chrono::parse_duration(cfg_["dummy_player_timer_interval"], 0s);
|
||||
}
|
||||
start_dummy_player_updates();
|
||||
}
|
||||
|
@ -613,7 +613,7 @@ void server::dump_stats(const boost::system::error_code& ec)
|
|||
|
||||
void server::start_dummy_player_updates()
|
||||
{
|
||||
dummy_player_timer_.expires_after(std::chrono::seconds(dummy_player_timer_interval_));
|
||||
dummy_player_timer_.expires_after(dummy_player_timer_interval_);
|
||||
dummy_player_timer_.async_wait([this](const boost::system::error_code& ec) { dummy_player_updates(ec); });
|
||||
}
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ private:
|
|||
void handle_lan_server_shutdown(const boost::system::error_code& error);
|
||||
|
||||
boost::asio::steady_timer dummy_player_timer_;
|
||||
int dummy_player_timer_interval_;
|
||||
std::chrono::seconds dummy_player_timer_interval_;
|
||||
void start_dummy_player_updates();
|
||||
void dummy_player_updates(const boost::system::error_code& ec);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue