Forum Moderators: bakedjake

Message Too Old, No Replies

Timing in Microseconds

         

amirsamy

9:08 pm on May 5, 2005 (gmt 0)

10+ Year Member



Hi,
I am writing an application to test the performance of some module and I want to time the operation of certain steps in the application. I need the time in microseconds, and I'm not sure how to do this. Any suggestions?
Thanks

moltar

10:51 pm on May 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What language are you writing it on?

amirsamy

1:24 am on May 6, 2005 (gmt 0)

10+ Year Member



Im using C

sitz

4:14 am on May 6, 2005 (gmt 0)

10+ Year Member



check the gettimeofday(2) man page.

MattyMoose

3:39 pm on May 10, 2005 (gmt 0)

10+ Year Member



Sitz's suggestion is the one I was thinking of. I used it before when making an application that depended on small timings like that, but was relatively portable, and didn't need to grab "raw" clock ticks from the CPU.

my 0.02 :)