Created
April 30, 2010 13:05
-
-
Save willf/385159 to your computer and use it in GitHub Desktop.
Stopwatch elapsed timer in F#
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
open System | |
let sw = System.Diagnostics.Stopwatch() | |
sw.Start() | |
// some calculations | |
sw.Stop() | |
System.Console.WriteLine("Time elapsed: {0}", sw.Elapsed);; | |
// Time elapsed: 00:07:40.4029123 | |
sw.Reset() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This shows how to set up a timer in F# (and any .NET language)