[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: time: Should real time usage account discontinous jumps?

From: Bob Proulx
Subject: Re: time: Should real time usage account discontinous jumps?
Date: Wed, 25 Sep 2013 23:00:11 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Petr Pisar wrote:
> The GNU time as well as bash built-in compute real time process usage as
> a simple difference between two real time points. If there was a time
> adjustement in between (by NTP or manual), the meassured value would be
> affected.

NTP will never step the clock.  NTP will adjust the time of each clock
tick to keep the clock on time and so that every tick is present.  If
the clock is being step'd it would be due to other reasons such as

But why would there be a time adjustment between?  Stepping the clock
is an abnormal condition.  It isn't something that should ever happen
during normal system operation.  If your clock is being stepped then
that is a bug and needs to be fixed.

> I have found any hint nowhere if this is intended behavior or if one
> should meassure some kind of monotic time line.

Since stepping the clock is not a normal condition I don't think it
matters.  It certainly isn't a problem if the system is running NTP
and the clock is running normally.

> Is there any general agreement? My personal opinion is that
> monotonic clock_gettime(CLOCK_MONOTONIC_RAW) is the best option.

I think that if you are needing a different clock that the problem is
not with time, gettime, or other time source.  The problem is due to
something stepping the clock abnormally.  Figure out why your system
clock is being stepped and fix that problem first.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]