Skip to content

Instantly share code, notes, and snippets.

@sandy98
Created April 27, 2012 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sandy98/2514318 to your computer and use it in GitHub Desktop.
Save sandy98/2514318 to your computer and use it in GitHub Desktop.
Testing Iced CoffeeScript
#!/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