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: Francesco Potortì
Subject: Re: pause(.01) gives a mean pause of 0.0102 and not 0.0100 seconds
Date: Thu, 17 Oct 2019 10:50:51 +0200

>but what is the hard part? is it not just a pause command in C++?

You should read a bit about real-time systems and how they are
implemented.  You have no hope of getting millisecond resolution on a
system that is not designed for this.

All you can do at high level is maintain the average distance between
your invocations by using a cumulative timer and a tight loop.  You'll
get as little jitter as possible given your OS allowance and you'll get
perfect interval time length average, that is, no drift.

-- 
IPIN'19 http://ipin2019.isti.cnr.it    Voice:  +39.050.621.3058
Francesco Potortì (ricercatore)        Mobile: +39.348.8283.107
ISTI - Area della ricerca CNR          Skype:  wnlabisti
via G. Moruzzi 1, I-56124 Pisa         Web:    http://fly.isti.cnr.it




reply via email to

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