> I have VB6 program that run CNC plasma machine. It work very well and > smooth under win200, but in WinXP machine motion is not good. > > It doesnot help if I set REALTIME prority for the process ... > > How about Linux and Gambas? Daes it depent on version of Linux ... > > What is resolution for Gambas Timer? Can I wait 10 microsec do something > wait 10 microsec and so on ... > > Regards >
If you use timers, then the interpreter maintains a list of all timers, and knows how long it should wait before the next timer must be raised. If the interpreter must wait more than 10 ms, then he sleeps inside the select() system call. If he must wait less than 10 ms, then he enters a busy loop that takes 100% CPU before doing the select() system call once with a timeout of zero. Otherwise, if you don't use timers, you can use: - The WAIT instruction. This instruction runs an event loop, so you have the same behaviour as above. - The SLEEP instruction, which uses the nanosleep() system call. At the moment, SLEEP does not do busy loops for very small delays. This may change in the future, in Gambas 3. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user