Created
February 12, 2012 21:09
-
-
Save davidgrenier/1810862 to your computer and use it in GitHub Desktop.
Timing functions
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
let time f = | |
let sw = System.Diagnostics.Stopwatch.StartNew() | |
f () |> ignore | |
printfn "Took %fs" sw.Elapsed.TotalMilliseconds | |
time (fun () -> System.Threading.Thread.Sleep 1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment