[go: up one dir, main page]

File: s-diff.c

package info (click to toggle)
uftrace 0.18.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,356 kB
  • sloc: ansic: 49,770; python: 11,181; asm: 837; makefile: 769; sh: 637; cpp: 627; javascript: 191
file content (30 lines) | stat: -rw-r--r-- 289 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <stdlib.h>
#include <unistd.h>

int bar(void)
{
	usleep(100);
}

int foo(void)
{
	usleep(1000);
	bar();
}

int main(int argc, char *argv[])
{
	int do_sleep = 0;

	if (argc > 1)
		do_sleep = atoi(argv[1]);

	if (do_sleep) {
		usleep(10);
		foo();
		bar();
	}
	foo();

	return 0;
}