File: timeout.c

package info (click to toggle)
criterion 2.3.3git1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,832 kB
  • sloc: ansic: 17,852; cpp: 795; python: 72; sh: 27; makefile: 23
file content (12 lines) | stat: -rw-r--r-- 198 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#include <criterion/criterion.h>

#ifdef _WIN32
# include <windows.h>
# define sleep(x)    Sleep(x * 1000)
#else
# include <unistd.h>
#endif

Test(timeout, simple, .timeout = 1.) {
    sleep(10);
}