Ticket #2445: slow.c

File slow.c, 233 bytes (added by Max-P, 14 years ago)

The slow.c program that simulates netowork lag on the output.

Line 
1#include <stdio.h>
2#include <time.h>
3
4int main(void) {
5 int i;
6
7 while(1) {
8 /* Sleep for a second */
9 sleep(3);
10
11 /* Read 900kb from stdin */
12 for(i = 0; i < 900000; i++) {
13 getchar();
14 }
15
16 /* Start over */
17 }
18
19 return 0;
20}