Search:
Login
Preferences
Help/Guide
About Trac
Register
Forgot your password?
Wiki
Timeline
View Tickets
Search
Tags
Context Navigation
Back to Ticket #2445
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
4
int
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
}
Download in other formats:
Original Format