OLD | NEW |
1 #!/usr/bin/perl -wT | 1 #!/usr/bin/perl -wT |
2 | 2 |
| 3 use Time::HiRes; |
| 4 |
3 # flush the buffers after each print | 5 # flush the buffers after each print |
4 select (STDOUT); | 6 select (STDOUT); |
5 $| = 1; | 7 $| = 1; |
6 | 8 |
7 print "Content-Type: text/html\n\n"; | 9 print "Content-Type: text/html\n\n"; |
8 | 10 |
9 for ($count=1; $count<3000; $count++) { | 11 sub sendChunk() { |
10 print "         
0;       "; | 12 print "         
0;       "; |
11 print "        �
20;       "; | 13 print "        �
20;       "; |
12 print "         �
020;       "; | 14 print "         �
020;       "; |
13 print "        �
20;       "; | 15 print "        �
20;       "; |
14 print "        
0;       "; | 16 print "        
0;       "; |
15 print "        
0;      "; | 17 print "        
0;      "; |
16 print "         
;        "; | 18 print "         
;        "; |
17 print "          �
20;       "; | 19 print "          �
20;       "; |
18 } | 20 } |
| 21 |
| 22 sendChunk(); |
| 23 # Delay for 1 s which should be long enough to exit the 50 ms slot of XHR's |
| 24 # ProgressEvent throttle (very long considering slow builds). |
| 25 Time::HiRes::sleep(1); |
| 26 sendChunk(); |
OLD | NEW |