diff options
| author | nasr <nsrddyn@gmail.com> | 2026-04-16 22:00:14 +0200 |
|---|---|---|
| committer | nasr <nsrddyn@gmail.com> | 2026-04-16 22:00:14 +0200 |
| commit | 13d9e4df0f4555079d16313a54c6035e22d575a6 (patch) | |
| tree | a0a80aedf61a892bf90daf02690de9335e6fc7a8 /source/base/base_platform.h | |
| parent | 8ea6a3c8621287d11296b8300029f32a27743d9a (diff) | |
feature(base): attempt at generating a random number
Diffstat (limited to 'source/base/base_platform.h')
| -rw-r--r-- | source/base/base_platform.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/source/base/base_platform.h b/source/base/base_platform.h index 91cd55d..b34a7d0 100644 --- a/source/base/base_platform.h +++ b/source/base/base_platform.h | |||
| @@ -2,17 +2,5 @@ | |||
| 2 | #define BASE_PLATFORM_H | 2 | #define BASE_PLATFORM_H |
| 3 | 3 | ||
| 4 | #ifdef BASE_PLATFORM_IMPLEMENTATION | 4 | #ifdef BASE_PLATFORM_IMPLEMENTATION |
| 5 | internal inline void | ||
| 6 | sleep_ms(long ms) | ||
| 7 | { | ||
| 8 | struct timespec ts; | ||
| 9 | ts.tv_sec = ms / 1000; | ||
| 10 | ts.tv_nsec = (ms % 1000) * 1000000L; | ||
| 11 | |||
| 12 | while (nanosleep(&ts, &ts)) | ||
| 13 | { | ||
| 14 | NULL; | ||
| 15 | } | ||
| 16 | } | ||
| 17 | #endif /* BASE_PLATFORM_IMPLEMENTATION */ | 5 | #endif /* BASE_PLATFORM_IMPLEMENTATION */ |
| 18 | #endif /* BASE_PLATFORM_H */ | 6 | #endif /* BASE_PLATFORM_H */ |
