"Richard G. Riley" <rg***********@gmail.com> writes:
On 2006-02-21, Romulo Carneiro <ro***********@gmail.com> wrote: Hi all,
I want to calculate a time of any routine in micro second.I know there
is a function utime.h in the programming linux.But I'm using a OS
Windows. If somebody know the soluction, let me know, please. Thanks!!
Two seconds with google :
http://www.unb.ca/metrics/software/HRtime.html
HW & OS Platform independant.
No, the code at that URL is Windows-specific (see the "#include <windows.h>"
in the source code).
I don't believe it's possible to implement a high-resolution timer
that's independent of the hardware and operating system. It may be
possible to implement one that's fairly widely portable, using a nest
of #ifdefs, but some systems may not even provide a way to get a time
to microsecond resolution.
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.