1 #pragma once 2 3 #include <cstddef> 4 5 namespace pixel_modem { 6 7 /** 8 * @brief Interface for time based operations. 9 * 10 * This interface was intentionally not called `Clock`, like the Java side 11 * counterpart since it's likely that clients would call the local variable 12 * `clock(_)`, which would clash with the C defined `clock` method. 13 */ 14 struct ClockManager { 15 virtual ~ClockManager() = default; 16 17 /** 18 * @brief Sleep the thread for a given number of seconds. 19 * 20 * @param seconds Minimum number of seconds to sleep for. Note, this is 21 * different than the Java android clock which accepts seconds. This was done 22 * because C++ developers are likely more familiar with the `sleep` command, 23 * which accepts seconds. 24 */ 25 virtual void Sleep(size_t seconds) const = 0; 26 }; 27 28 } // namespace pixel_modem 29