Re: Timing function call
- From: "Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@xxxxxxxxxxxxxxx>
- Date: Wed, 11 Oct 2006 08:17:07 -0700
"Bruno van Dooren [MVP VC++]" <bruno_nos_pam_van_dooren@xxxxxxxxxxx> wrote
in message news:963A32CE-EBD9-4E48-A923-0B7FD7E69F11@xxxxxxxxxxxxxxxx
You can use the Stopwatch class to do that very easily. See MSDN for more
info.
A note of caution if you want to use ns precision:
(From this thread:
http://groups.google.com/group/microsoft.public.vc.language/browse_thread/thread/7ed4163c3b487c46/6f3c2bcaba6ff09c?&hl=en#6f3c2bcaba6ff09c
)
"One should not use Elapsed.Ticks to calculate the elapsed time in
nanoseconds.
The only correct way to get this high precision count is by using
Stopwatch.ElapsedTicks like this:
<G> Been there, done that. Brilliant design that Stopwatch.Elapsed.Ticks
and Stopwatch.ElapsedTicks are both valid but have radically different
meanings.
-cd
.
- Prev by Date: help needed with command line linker invocation
- Next by Date: Re: CLI Service with MFC ?
- Previous by thread: help needed with command line linker invocation
- Next by thread: Cannot debug from unmanged code into managed code
- Index(es):
Relevant Pages
|