Commit b040458b authored by Alessandro Rubini's avatar Alessandro Rubini

time-unix: set t->correct in timestamps

The servo is now using this bit, so it should be set by all stampers.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent b668917b
...@@ -79,6 +79,7 @@ static int unix_recv_msg(struct pp_instance *ppi, int fd, void *pkt, int len, ...@@ -79,6 +79,7 @@ static int unix_recv_msg(struct pp_instance *ppi, int fd, void *pkt, int len,
if (tv) { if (tv) {
t->seconds = tv->tv_sec; t->seconds = tv->tv_sec;
t->nanoseconds = tv->tv_usec * 1000; t->nanoseconds = tv->tv_usec * 1000;
t->correct = 1;
} else { } else {
/* /*
* get the recording time here, even though it may put a big * get the recording time here, even though it may put a big
......
...@@ -26,6 +26,7 @@ static int unix_time_get(struct pp_instance *ppi, TimeInternal *t) ...@@ -26,6 +26,7 @@ static int unix_time_get(struct pp_instance *ppi, TimeInternal *t)
clock_fatal_error("clock_gettime"); clock_fatal_error("clock_gettime");
t->seconds = tp.tv_sec; t->seconds = tp.tv_sec;
t->nanoseconds = tp.tv_nsec; t->nanoseconds = tp.tv_nsec;
t->correct = 1;
if (!(pp_global_flags & PP_FLAG_NOTIMELOG)) if (!(pp_global_flags & PP_FLAG_NOTIMELOG))
pp_diag(ppi, time, 2, "%s: %9li.%09li\n", __func__, pp_diag(ppi, time, 2, "%s: %9li.%09li\n", __func__,
tp.tv_sec, tp.tv_nsec); tp.tv_sec, tp.tv_nsec);
......
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