How can i calculate a execute Time of routine Or function?

R

Romulo Carneiro

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!!
 
K

Keith Thompson

Romulo Carneiro said:
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!!

Then ask in a Windows programming newsgroup (assuming you can't find
the answer in your system's documentation).
comp.os.ms-windows.programmer.win32 is likely to be a good place to ask.
 
K

Keith Thompson

Richard G. Riley said:
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.
 
R

Richard G. Riley

No, the code at that URL is Windows-specific (see the "#include <windows.h>"
in the source code).


Grrr. I have no idea why I wrote "independant" : I of course meant
dependant as the first lines on the link make clear
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,175
Messages
2,570,944
Members
47,491
Latest member
mohitk

Latest Threads

Top