15 Apr '13, 10pm

Jay Fields' Thoughts: Clojure: Freezing Time Added To expectations... Updated post...

If you're using expectations and Joda Time, you now have the ability to freeze time in bare expectations (version 1.4.16 and above). The following code demonstrates how you can use the freeze-time macro to set the time, verify anything you need, and allow time to be reset for you. Under the covers freeze-time is setting the current millis using the DateTime you specify, running your code and resetting the current millis in a finally. As a result, after your code finishes executing, even if finishing involves throwing an exception, the millis of Joda Time will be set back to working as you'd expect. The freeze-time macro can be used in both the expected and actual forms, and can be nested if you need to set the time multiple times within a single expectation.

Full article: http://blog.jayfields.com/2012/11/clojure-freezing-time-a...

Tweets

A Waste Of Time:

A Waste Of Time:

bolehland.net 15 Apr '13, 4pm

Tell that makcik mekap tebal that you're doing what you love, so it doesn't matter if you get money or not. I freaking hat...

@tvdstorm ah, I think clojure macro's can, they...

blog.jayfields.com 09 Apr '13, 11am

you can call &env and &form to get a bit of interesting information that may or may not be helpful. Here's a few examples ...

Your Time Is Now!

Your Time Is Now!

golfdigest.com 26 Apr '13, 1pm

It was 20-plus years ago that a Calvin Klein underwear campaign made Mark Wahlberg's six-pack the most famous abs in pop c...

Google Analytics Just Added New Time Saving Wid...

searchenginejournal.com 17 Apr '13, 6pm

Shortly after Google Analytics received real time reporting , they released new time saving widgets. These widgets are ava...