Re: waittime function precision
Buck Calabro <[email protected]>
| Newsgroups | gmane.comp.lang.as400.c |
|---|---|
| Organization | midrange.com |
| Message-ID | <[email protected]> |
On 4/15/2014 7:04 AM, Jevgeni Astanovski wrote: > I've used waittime function for pretty long time in cases, where I needed to have a delay in my program. > But recently a question appeared - how precise it is and are there any alternatives that allow to make delays for less than 1/100 of a second. I think this is expected behaviour for waittime(). I always understood waittime to guarantee a minimum delay, not to guarantee a precise delay. _WAIT_NORMAL sets all bits off, so Access state control = no explicit transfer of PAG MPL control = remove thread from multiprogramming level Async signals = Not allowed Judging from this, it seems like there would be some time the processor spends swapping the thread into and out of the MPL. It would be interesting to try this on a dedicated machine, and also with _WAIT_MPL_SET rather than _WAIT_NORMAL. http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Frzatk%2FWAITTIME.htm --buck -- This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list To post a message email: C400-L-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/c400-l or email: C400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/c400-l.