interrupable sleep

new topic     » topic index » view thread      » older message » newer message

I need a function, that sleep for some seconds. Waiting can be interrupted with the action. In such case that function has to return TRUE.

include std/types.e
 
function heDidNotWait(integer Seconds) 
  for i = 1 to Seconds do 
    if isInterrupted() then 
      return TRUE 
    end if 
  end for 
  return FALSE 
end function

By the way, function isInterrupted has to return TRUE, if the castor of a mouse was turned. How to do it? Perhaps to reconstruct function?

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu