Is there a Thread.sleep or Yield behaviour ?

Post

Posted
Rating:
#1 (In Topic #1281)
Regular
sergioabreu is in the usergroup ‘Regular’
 Some times we want an application to give out some processing power, to allow for instance to get a new key pressed or a button click.

Does gambas (or qt ) has something like Thread.sleep or Yield function to make the current task sleep for a while allowing other events to be heard?

Thanks
Online now: No Back to the top

Post

Posted
Rating:
#2
Guru
BruceSteers is in the usergroup ‘Guru’
Wait and Sleep

Wait is used like VB DoEvents()  this pauses the program while the event loop continues to run.

Sleep pauses everything including the event loop.

Wait has options.
Alone it waits for the event loop to finish all queued executions
Wait Next waits for event loop once.
Wait 1 ' wait's 1 second
Wait 0.1 ' wait 1/10th of a second

/lang/wait - Gambas Documentation
Online now: No Back to the top
1 guest and 0 members have just viewed this.