AlpacaLibary  1.63
A closed source C++ bot for OSRS
Countdown.hpp
Go to the documentation of this file.
1 #ifndef COUNTDOWN_HPP_INCLUDED
2 #define COUNTDOWN_HPP_INCLUDED
3 
4 #include <iostream>
5 #include <cstdint>
6 
7 class Countdown
8 {
9  public:
11  Countdown(std::uint64_t Time);
12  void Reset();
13  void SetTime(std::uint64_t Time);
14  std::uint64_t GetTimeRemaining() const;
15  std::uint64_t GetStartTime() const;
16  bool IsFinished() const;
17 
18  friend std::ostream& operator<<(std::ostream& OS, const Countdown& C);
19  operator bool() const;
20 
22  private:
23  std::uint64_t Time;
24  std::uint64_t StartTime;
25 };
26 
27 #endif // COUNTDOWN_HPP_INCLUDED
std::uint64_t GetTimeRemaining() const
bool IsFinished() const
Countdown(std::uint64_t Time)
void Reset()
std::uint64_t GetStartTime() const
friend std::ostream & operator<<(std::ostream &OS, const Countdown &C)
void SetTime(std::uint64_t Time)