DBLWizard,
Basically, when you want to find out how long something takes, store the
value of DateTime.Now in a variable, and then at the end of the operation,
subtract that from the current DateTime.Now value. This will give you a
TimeSpan instance from which you can find out how many milliseconds have
elapsed.
In .NET 2.0, you will want to use the Stopwatch class (I believe it is
in System.Diagnostics), as it will use the performance counter and give you
much more accurate results (as well as finer resolution, should you need
it).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"DBLWizard" <ib*********@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Howdy,
I have looked and don't see a straight forward way to calculate time
differences in milliseconds.
What I am wanting to do is benchmark or time how long things take. So
I want to record the time ... do something ... record the time and see
how long the "do something" took.
Am I just being hairbrained here and its right in front of me or what?
Thanks
dbl