22 using namespace std::chrono_literals;
25 constexpr
auto warn_threshold = 20
s;
26 constexpr
auto fade_end = warn_threshold / 2;
32 , last_timestamp_(
clock::now())
33 , playing_sound_(false)
47 auto now = clock::now();
49 return std::chrono::duration_cast<std::chrono::milliseconds>(now - prev_time);
61 if(timer_refresh_rate.poll()) {
80 const auto fadein_ticks = std::max(loop_ticks - fade_end, 0ms);
countdown_clock(team &team)
std::chrono::steady_clock clock
clock::time_point last_timestamp_
virtual void process() override
Inherited from pump_monitor.
std::chrono::milliseconds update_timestamp()
This class stores all the data for a single 'side' (in game nomenclature).
void set_countdown_time(const std::chrono::milliseconds &amount) const
std::chrono::milliseconds countdown_time() const
static bool ui_sound_on()
void play_timer(const std::string &files, const std::chrono::milliseconds &loop_ticks, const std::chrono::milliseconds &fadein_ticks)
static map_location::direction s