Created
April 27, 2012 23:42
-
-
Save sandy98/2514318 to your computer and use it in GitHub Desktop.
Testing Iced CoffeeScript
This file contains 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/env iced | |
# only Iced CoffeeScript (http://maxtaco.github.com/coffee-script/) will be able | |
# to run this, as await and defer are not yet included in | |
#mainstream CoffeeScript, at least, as of 2012-04-27 | |
acum = 0 | |
interval = parseInt(process.argv[2]) or 1000 | |
console.log "Starting counter" | |
for n in [1..5] | |
await setTimeout(defer(), interval) | |
acum += interval | |
console.log "Elapsed #{acum} milliseconds" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment