introduce MwWidget->berserk

This commit is contained in:
Nishi 2026-01-23 15:29:32 +09:00
commit 5413332506
Signed by: nishi
GPG key ID: 27EF69B208EB9343
4 changed files with 43 additions and 9 deletions

View file

@ -46,16 +46,11 @@ long MwTimeGetTick(void) {
}
void MwTimeSleep(int ms) {
#ifdef __NetBSD__
usleep(ms * 100);
#else
/* i don't know why this method does not work well on netbsd */
struct timespec ts;
ts.tv_sec = ms / 1000;
ts.tv_nsec = (ms % 1000) * 1000000;
nanosleep(&ts, NULL);
#endif
}
#endif