Created
May 29, 2015 03:42
-
-
Save zwetan/86ae3ed405f7fd788340 to your computer and use it in GitHub Desktop.
a basic "forever loop"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/as3shebang -- | |
import C.stdlib.*; // exit | |
import C.unistd.*; // sleep | |
var i:uint = 0; | |
function show():void | |
{ | |
trace( "hello", i ); | |
i++; | |
} | |
// main loop | |
while( true ) | |
{ | |
sleep( 5000 ); | |
show(); | |
if( i > 5 ) | |
{ | |
exit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment