Re: stop g_timeout_add ()



On Thursday 30 September 2004 04:24, Sigrid Meneses wrote:

Hi,

> im using a function called g_timeout_add (), with it i call a function 
> that executes every period of time, but i want to stop that function  
> with a button, or i dont know can you help me?

Two ways to stop a timeout:

(a) return FALSE in the timeout callback.

(b) use g_source_remove() with the number that g_timeout_add() returned.

Cheers 
 -Tim




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]