On Wed, 22 Dec 2021 08:54:00 +0800
Yanling Song <son...@ramaxel.com> wrote:

> > If all you want is jiffie accuracy,  you could use
> > CLOCK_MONOTONIC_COARSE.
> >   
> I did not get your point: CLOCK_MONOTONIC is more accurate than
> CLOCK_MONOTONIC_COARSE, right?

CLOCK_MONOTONIC ends up using the TSC counter and values in the
shared page (VDSO) to compute time accurately.

CLOCK_MONOTONIC_COARSE is faster and good enough if you only
want ms accuracy. It just reads a value from shared page
and avoids the TSC instruction.

Reply via email to