[Gambas-user] Timer

nando nando_f at ...951...
Mon Dec 14 04:58:40 CET 2009


>From using it and from Benoits previous help,
My understanding of Timer is as follows:

When the Timer is supposed to fire, it will if the Interpreter
is available to invoke the SUB with the Timer code.

If some other SUB is busy or if CPU loaded, it is not noticed..and forgotten.

What two things I have done to help this, 
If CPU loaded, run compiled program not very nice:  nice -n -7 {your program}
If you have a sub that is very long to run, split up the code in the sub
 so that it calls another sub.  This way, the interpreter works often enough.

-Fernando


---------- Original Message -----------
From: Laurent Alebarde <l.alebarde2 at ...402...>
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Sent: Sun, 13 Dec 2009 11:54:47 +0100
Subject: Re: [Gambas-user] Timer

> Have a look here, it may helps you :
> http://forums.genthttp://forums.gentoo.org/viewtopic-t-790101-highlight-xenomai.html
> 
> Benoît Minisini a écrit :
> >> Hi,
> >> I've an application that has a timer that should get fired every 1
> >> second. Sometimes when the application is running and my desktop is
> >> under heavy load the timer doesn't get fired in time. Despite this, my
> >> expectation was that gambas would queue all this "Timer" events and they
> >> would get executed as soon as it got enough free CPU time.
> >> Opposed to that, gambas just discards them... i.e. If my system isn't
> >> responsive for 5 seconds, after this time I won't get the Timer() method
> >> called 5 times for each second where it should have been called.
> >>
> >> Is there a way to get the timer control working in a way that it queues
> >> the due events, and they get executed even if it is later on?
> >> Thanks,
> >> Toni
> >>
> >> P.S: Using Gambas 2.18, Ubuntu 8.10 64bits
> >>
> >>     
> >
> > No, sorry: you must do it yourself.
> >
> > Regards,
> >
> >
> 
> ------------------------------------------------------------------------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------




More information about the User mailing list