This commit is contained in:
xin
2025-06-30 15:48:46 +08:00
parent bd5fac5ec8
commit 5279134836

View File

@ -20,6 +20,9 @@ unsigned long long get_system_uptime_ms() {
struct timespec ts; struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts); clock_gettime(CLOCK_MONOTONIC, &ts);
return (unsigned long long)(ts.tv_sec) * 1000 + ts.tv_nsec / 1000000; return (unsigned long long)(ts.tv_sec) * 1000 + ts.tv_nsec / 1000000;
void Sleep() {
usleep(1000); // Sleep for 1 millisecond
}
#endif #endif
} }