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
parent
fefd5b4b05
commit
7d740f17e5
|
@ -1055,7 +1055,7 @@ static int update_pmc(struct node *node, int subscribe)
|
||||||
struct timespec tp;
|
struct timespec tp;
|
||||||
uint64_t ts;
|
uint64_t ts;
|
||||||
|
|
||||||
if (clock_gettime(CLOCK_REALTIME, &tp)) {
|
if (clock_gettime(CLOCK_MONOTONIC, &tp)) {
|
||||||
pr_err("failed to read clock: %m");
|
pr_err("failed to read clock: %m");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue