in reply to Re: Call function no more than every 0.1 seconds
in thread Call function no more than every 0.1 seconds

I like this idea. This Is like a "throttle" to reduce number of requests per second.
Sounds pretty good to me. But be aware that execution will not happen on .1 sec intervals.
  • Comment on Re^2: Call function no more than every 0.1 seconds

Replies are listed 'Best First'.
Re^3: Call function no more than every 0.1 seconds
by jcb (Parson) on Aug 13, 2020 at 01:08 UTC

    It will get very close. The delay is calculated after the work for "this" cycle has been done. The accuracy is limited by the accuracy of whatever you use to implement the delay, of course, and the system scheduler might preempt your process, but this can be limited by keeping the load reasonable. As I understand, a load average less than the number of processors means that all tasks are (on average) being run whenever they are not blocked.