scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1/*
 2output:
 3testing
 4done
 5end:
 6*/
 7
 8#include <assert.h>
 9#include <stdio.h>
10#include <time.h>
11
12int
13test(void)
14{
15	double d1, d2;
16	time_t t1, t2;
17
18	for (t1 = t2 = time(NULL); difftime(t2, t1) < 1; t2 = time(NULL))
19		;
20
21	d1 = difftime(t1, t2);
22	d2 = difftime(t2, t1);
23	assert(d1 + d2 < 0.00005);
24}
25
26int
27main(void)
28{
29	puts("testing");
30	test();
31	puts("done");
32
33	return 0;
34}