Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

this one shows the problem

  • Loading branch information...
commit cf270441d5ab0e143591119a4e28ed883e3c12b2 1 parent 381e2a4
@osresearch authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 checkerboard
View
10 checkerboard
@@ -29,9 +29,10 @@ while (1)
{
for(my $x = 0; $x < $width ; $x++)
{
- my $r = ($i % 7 == 0) ? $bright : 0;
- my $g = ($i % 7 == 1) ? $bright : 0;
- my $b = ($i % 7 == 2) ? $bright : 0;
+ my $c = $i % 7;
+ my $r = ($c == 0 || $c == 2) ? $bright : 0;
+ my $g = ($c == 1 || $c == 2) ? $bright : 0;
+ my $b = 0; #($i % 7 == 2) ? $bright : 0;
$s .= chr($r);
$s .= chr($g);
@@ -41,6 +42,7 @@ while (1)
}
$sock->send($s);
- usleep(80000);
+ usleep(1e6/4);
+ #usleep(10);
$i++;
}
Please sign in to comment.
Something went wrong with that request. Please try again.