Timer function

Hi all!,

I would like to know if there is a similar function than time(). Time() returns the current calendar time, in seconds, since 00:00:00 January 1, 1970 Coordinated Universal Time (UTC).

I need a function that returns miliseconds or nanoseconds, not seconds.

Thanks!

clock_gettime().

Thanks!