summaryrefslogtreecommitdiff
path: root/source/tests/duration.test.c
blob: 56919e40e2c5ad84314731512d0a1bc6389a4a18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#define KIT_TEST_FILE duration
#include "../kit_test/test.h"

#if defined(_WIN32) && !defined(__CYGWIN__)
__declspec(dllimport) void __stdcall Sleep(unsigned long timeout);
static void kit_sleep(int ms) {
  Sleep(ms);
}
#else
#  include <stdlib.h>
#  include <unistd.h>
static void kit_sleep(int ms) {
  usleep(ms * 1000);
}
#endif

TEST("test duration") {
  kit_sleep(100);
}