phc2sys: Use CLOCK_MONOTONIC to time pmc updates.

After moving the leap second check away from update_pmc(), the time
stamp is used only to control the pmc update interval. Switch to
CLOCK_MONOTONIC to keep the interval stable when CLOCK_REALTIME is
stepped.
master
Miroslav Lichvar 2014-06-20 16:25:01 +02:00 committed by Richard Cochran
parent fefd5b4b05
commit 7d740f17e5
1 changed files with 1 additions and 1 deletions

View File

@ -1055,7 +1055,7 @@ static int update_pmc(struct node *node, int subscribe)
struct timespec tp;
uint64_t ts;
if (clock_gettime(CLOCK_REALTIME, &tp)) {
if (clock_gettime(CLOCK_MONOTONIC, &tp)) {
pr_err("failed to read clock: %m");
return -1;
}