Need current time in milliseconds

I am producing a log that needs millisecond resolution in linux c/c++. I know that it can be inaccurate, but at least its more resolution than seconds. Is there a get current time with milliseconds or microseconds? I can convert microseconds up to milliseconds if necessary.

Thanks,
Robert
Look up clock_gettime().
I think I found gettimeofday which is simpler than clock_gettime. Hopefully it will give me what I am looking for.

Thanks for the help,
Robert
Thanks for the help
Topic archived. No new replies allowed.