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.