Commit d7b4fea2 authored by baujc's avatar baujc

Optimize unix time update in L1Sync servo

As we can get know the WR time (IRPC call) we use it instead of using
the T4 time aproximation. Making some tests, the difference between Unix
time and WR time is around 30us (was 20ms before with T4)
parent c85d25aa
......@@ -495,11 +495,11 @@ int l1e_servo_update(struct pp_instance *ppi)
/*
* Now, let's fix system time. We pass here
* once only, so that's the best place to do
* it. We can't use current WR time, as we
* still miss the method to get it (through IPC).
* So use T4, which is a good approximation.
*/
unix_time_ops.set(ppi, &ppi->t4);
* it. We use current WR time.
* */
struct pp_time t;
ppi->t_ops->get(ppi,&t);
unix_time_ops.set(ppi, &t);
pp_diag(ppi, time, 1, "system time set to %li TAI\n",
(long)ppi->t4.secs);
}
......
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