Timer

Timer

Postby Lisa Giordano » Mon Sep 08, 2008 10:29 am

Posso cambiare INTERVAL di un timer attivato?
Grazie
User avatar
Lisa Giordano
 
Posts: 25
Joined: Wed Jul 09, 2008 5:56 pm

Postby Antonio Linares » Mon Sep 08, 2008 10:36 am

Lisa,

Windows does not allows to change the timer interval, but what you can do is to control the time from the timer action:
Code: Select all  Expand view
function MyTimerAction()

   static nSeconds := 0

   if nSeconds++ > GetInterval()
      nSeconds = 0
      ... code to execute ...
   endif

return nil   

function GetInterval()

   do case
        case ...
             return 10     // wait 10 seconds

        case ...
             return 20     // wait 20 secondss

   ...

return 60 // wait 60 seconds
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests