The System.Diagnostics.Stopwatch class provides timing.

[link:msdn2.microsoft.com]

You can time an application as:

let timeThunk f =

let sw = new System.Diagnostics.Stopwatch() in

sw.Start();

let res = f () in

sw.ElapsedMilliseconds

By on 12/18/2006 2:30 PM ()

p.s. in fsi you can turn timing on and off with

> #time;;

By on 12/19/2006 6:32 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper