Please post code for displaying time in F#. I noticed that you can measure it from F# interactive with #time directive, but I don't know how to execute program from FSI
Thanks
Please post code for displaying time in F#. I noticed that you can measure it from F# interactive with #time directive, but I don't know how to execute program from FSI
Thanks
I would just use the .NET Stopwatch class.
From msdn:
So to test you function you have to open F# interactive console and execute your function in it (one way to do it is to select your function, right click and chose Execute in Interactive) Then make a call to your function in Interactive like that for example:
// define your function first either in interactive console or in your document:
You will see how much of real time and CPU time were spent on computation and a bit of information from garbage collector
Check out the timer function in the F Sharp Programming wikibook. It is defined like this:
Whilst being used like this: