fserb/vault — pull request #1 by ktravis (2014-05-22 16:53:50+00:00)
Title: Chainable Timer

I noticed in TODO you have a line about chaining timer delays which sounded useful so I set that up. I'm not sure if it fits your original intent, however, as I changed to behavior slightly in doing so.

Rather than using `new Timer().delay(1.0).run(f1).run(f2)` to wait one second, run function `f1`, then wait another second and run function `f2`, this will now wait one second and run `f1`,`f2` on consecutive frames. The new way to accomplish the first behavior would be `new Timer().delay(1.0).run(f1).delay(1.0).run(f2)`. This of course allows for more flexibility at the cost of being more explicit: `new Timer().delay(1.0).run(f1).delay(2.0).run(f2)` would wait one second, run `f1`, then wait two more seconds, run `f2`, and end.