Skip to content

Instantly share code, notes, and snippets.

@willf
Created April 30, 2010 13:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willf/385159 to your computer and use it in GitHub Desktop.
Save willf/385159 to your computer and use it in GitHub Desktop.
Stopwatch elapsed timer in F#
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()
@willf
Copy link
Author

willf commented Apr 30, 2010

This shows how to set up a timer in F# (and any .NET language)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment