AlpacaLibary  1.63
A closed source C++ bot for OSRS
Time.hpp
Go to the documentation of this file.
1 #ifndef TIME_HPP_INCLUDED
2 #define TIME_HPP_INCLUDED
3 
4 #include <cstdint>
5 #include <functional>
6 
7 void Wait(std::int64_t Duration);
8 std::uint64_t CurrentTimeMillis();
9 std::uint64_t CurrentTimeNanos();
10 bool WaitFunc(std::uint32_t Duration, std::uint32_t Step, std::function<bool()> Func);
11 bool WaitFunc(std::uint32_t Duration, std::uint32_t Step, std::function<bool()> Func, bool Result);
12 std::string MillisToHumanShort(std::int64_t Millseconds); // HH:MM:SS
13 std::string MillisToHumanMedium(std::int64_t Milliseconds); // 1h 30m 50s
14 std::string MillisToHumanLong(std::int64_t Millseconds); // Hours, Minutes, Seconds
15 
16 #endif // TIME_HPP_INCLUDED
std::uint64_t CurrentTimeNanos()
std::uint64_t CurrentTimeMillis()
std::string MillisToHumanMedium(std::int64_t Milliseconds)
std::string MillisToHumanLong(std::int64_t Millseconds)
void Wait(std::int64_t Duration)
std::string MillisToHumanShort(std::int64_t Millseconds)
bool WaitFunc(std::uint32_t Duration, std::uint32_t Step, std::function< bool()> Func)