Skip to content

Instantly share code, notes, and snippets.

@davidgrenier
Created February 12, 2012 21:09
Show Gist options
  • Save davidgrenier/1810862 to your computer and use it in GitHub Desktop.
Save davidgrenier/1810862 to your computer and use it in GitHub Desktop.
Timing functions
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