Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
GameQueueGate.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
6{
7 // Userifce.cpp::gameQueueLock/gameQueueUnLock and the
8 // DISPLAY_GAME_QUEUE_MAX_LOCK_SECONDS failsafe.
10 {
11 public:
12 static constexpr std::uint64_t MaxLockTicks = 15U * 60U;
13
14 void reset() noexcept;
15 void lock(std::uint64_t tick) noexcept;
16 void unlock(std::uint64_t tick) noexcept;
17 [[nodiscard]] bool blocks(std::uint64_t tick) noexcept;
18
19 [[nodiscard]] int count() const noexcept { return count_; }
21 { return lastActionTick_; }
22
23 private:
24 int count_{};
25 std::uint64_t lastActionTick_{};
26 };
27}
unsigned index
void lock(std::uint64_t tick) noexcept
bool blocks(std::uint64_t tick) noexcept
std::uint64_t lastActionTick() const noexcept
void unlock(std::uint64_t tick) noexcept
static constexpr std::uint64_t MaxLockTicks