Re: sleeping



Hi,

David Eduardo Gomez Noguera <davidgn servidor unam mx> writes:

> I am writing a program to control two steppers. To control its speed, i would need to sleep the function that moves them.
> Is it safe to use sleep/nanosleep? or are there safer functions or a better way to do it than a callback from an Entry widget (where i get the command from)? (I was just thinking a long coulback could hang the app, am i right?)

I'd suggest you use the GTK+ main loop instead and install a timeout.
Have a look at gtk_timeout_add().


Salut, Sven
 



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