measuring time

Hello all

I would like to know what are my options for measuring time in my program.
Im already using timeval and timespec structs but i cant understand if they return real time (including changes between processes ) or its time only from my program.

Are there any other option?I would like to have microsecond precision to my program.

Checkout the gnu-time source code.
┬┐Which time do you want?
_ gettimeofday() may be used for real time.
_ getrusage() or wait3() may be used for user time.
Last edited on
Another option:
But I don't know, it can give you milliseconds or not.
Topic archived. No new replies allowed.