Commit 231745f7 authored by Alessandro Rubini's avatar Alessandro Rubini

arch-gnu-linux: use CLOCK_MONOTIC, not the _RAW flavour

Not all libraries offer CLOCK_MONOTONIC_RAW, and actually it gives
no advantage over CLOCK_MONOTONIC in our context.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
Acked-by: Aurelio Colosimo's avatarAurelio Colosimo <aurelio@aureliocolosimo.it>
parent dc43a2c5
......@@ -44,7 +44,7 @@ int posix_timer_init(struct pp_instance *ppi)
int posix_timer_start(uint32_t interval_ms, struct pp_timer *tm)
{
struct timespec now;
clock_gettime(CLOCK_MONOTONIC_RAW, &now);
clock_gettime(CLOCK_MONOTONIC, &now);
tm->start = ((uint64_t)(now.tv_sec)) * 1000 +
(now.tv_nsec / 1000000);
tm->interval_ms = interval_ms;
......@@ -69,7 +69,7 @@ int posix_timer_expired(struct pp_timer *tm)
return 0;
}
clock_gettime(CLOCK_MONOTONIC_RAW, &now);
clock_gettime(CLOCK_MONOTONIC, &now);
now_ms = ((uint64_t)(now.tv_sec)) * 1000 +
(now.tv_nsec / 1000000);
......@@ -84,7 +84,7 @@ int posix_timer_expired(struct pp_timer *tm)
void posix_timer_adjust_all(struct pp_instance *ppi, int32_t diff)
{
/* Do nothing, clock_gettime uses MONOTONIC_RAW tstamps */
/* Do nothing, clock_gettime uses MONOTONIC tstamps */
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment