// Copyright 2023 alexevier // licensed under the zlib license #ifndef lexlib_os_h #define lexlib_os_h #include #include #include"common.h" // sleeps the thread for the specified number of seconds. LEXLIB_EXTERN void lexlibSleep(unsigned int seconds); // sleeps the thread for the specified number of milliseconds. LEXLIB_EXTERN void lexlibSleepMs(unsigned int millis); // gets a pseudorandom number from the OS that is cryptographically secure. // if 0 is returned it might mean that it failed, its recommended to retry. LEXLIB_EXTERN unsigned int lexlibRandom(void); // gets the physical ram size. // returns the size of the ram in bytes, 0 in case of error. LEXLIB_EXTERN uint64_t lexlibRamSize(void); #endif