# Fwd: \[SocketCan\] Problem of accuracy

- From: Mohamed HAMZAOUI \<hidden\>
- Date: 2012-07-09 11:26:03 
- List: linux-can
- Page: https://ratatoskr.run/linux-can/2012/07/9345261
- Thread: https://ratatoskr.run/linux-can/2012/07/9345261/t.md

```text
I think that is caused by Socketcan. Maybe, the nannosecond sleep is
correct but when the system call write on a CAN socket it takes 0.3 ms
to inject the data on the bus

|_______________________________|_____________|
nannosleep        1000µs                  call        300µs    real sending time

It's this possible and if this is true can i assume a fix 0.3 ms in
all my period ?

Regards
Mohamed

On Mon, Jul 9, 2012 at 12:21 PM, Wolfgang Grandegger [ref] wrote:
> On 07/09/2012 11:54 AM, Mohamed HAMZAOUI wrote:
>> Jitter : +- 10盜 (1% of the period)
>
> That's *not* achievable with the hardware you us! Neither with
> preempt-rt nor with Xenomai.
>
>> I test with 700000 ns 0.7ms and i have 1ms of period but I think it's
>> not usually true because it's probably depend of the CPU load !
>
> Wired, don't know where the 300us get lost systematically.
>
> Wolfgang
```
