19 #ifndef UUID_COMMON_H_
20 #define UUID_COMMON_H_
24 #if __has_include(<mutex>)
30 #ifndef UUID_COMMON_STD_MUTEX_AVAILABLE
31 # if __has_include(<mutex>) && (!defined(_GLIBCXX_MUTEX) || defined(_GLIBCXX_HAS_GTHREADS))
32 # define UUID_COMMON_STD_MUTEX_AVAILABLE 1
34 # define UUID_COMMON_STD_MUTEX_AVAILABLE 0
38 #if defined(DOXYGEN) || defined(ARDUINO_ARCH_ESP32) || UUID_COMMON_STD_MUTEX_AVAILABLE
39 # define UUID_COMMON_THREAD_SAFE 1
41 # define UUID_COMMON_THREAD_SAFE 0
57 #if UUID_COMMON_THREAD_SAFE
83 size_t print_to_string(
const Printable &printable, std::string &output);
size_t print_to_string(const Printable &printable, std::string &output)
Append to a std::string by printing a Printable object.
void loop()
Loop function that must be called regularly to detect a 32-bit uptime overflow.
uint64_t get_uptime_ms()
Get the current uptime as a 64-bit milliseconds value.
std::vector< const __FlashStringHelper * > flash_string_vector
Type definition for a std::vector of flash strings.
std::string printable_to_string(const Printable &printable)
Create a std::string from a Printable object.
std::string read_flash_string(const __FlashStringHelper *flash_str)
Read a string from flash and convert it to a std::string.
static constexpr bool thread_safe
Thread-safe status of the library.