help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pause(.01) gives a mean pause of 0.0102 and not 0.0100 seconds


From: Nicholas Jankowski
Subject: Re: pause(.01) gives a mean pause of 0.0102 and not 0.0100 seconds
Date: Wed, 16 Oct 2019 17:01:08 -0400

On Wed, Oct 16, 2019 at 4:48 PM GoSim <address@hidden> wrote:
>
> I use octave as a real time controller and use pause() to get my desired
> sample time. When I want to get a sample time of 0.01 seconds I get a mean
> pause of 0.0102 seconds. I tried pause(0.0100000) with the same result. I
> don't know if it is fixable or if it is a bug but I just wanted to make you
> aware.
>
> I attach a picture with the sample time in a real time environment and you
> can also see the command
> tic;pause(.01);toc in the octave console giving the same result.
>
> The real time environment is achieved with the chrt command in xubuntu.
>
> The graph in the pic shows the sample time which should 0.01 seconds.
>
> I hope you fix it! Kind regards.
>
> <https://octave.1599824.n4.nabble.com/file/t373066/octave_pause.png>
>

you may have noticed in the help for pause that this is not unexpected behavior:

"
...for example:

          tic; pause (0.05); toc
               -| Elapsed time is 0.05039 seconds.
"

curious, are you certain the error is in the pause function? is some
aspect of your realtime usage able to determine if the additional
delay is actually in the pause command and not it overhead from tic or
toc? (i.e., delay before or after they acquires the timestamp?)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]