summaryrefslogtreecommitdiff
path: root/source/platform/platform.c
blob: 2e7bbada4f2910d4680d71165b969c57e73ab152 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
internal inline void
sleep_ms(long ms)
{
  struct timespec ts;
  ts.tv_sec = ms / 1000;
  ts.tv_nsec = (ms % 1000) * 1000000L;

  while (nanosleep(&ts, &ts))
  {
    NULL;
  }
}