Roger,
It looks like DC_SetTimerEvent doesn't run the code block being timed for the first time until AFTER the timer has run the first time.
in this example, optimizepoll() doesn't run the first time until 60 seconds have elapsed. I thought the xbase settimerevent() ran the code clock first, then kicked the timer in. (i could certainly be wrong.. (AGAIN!!))
DCREAD GUI ;
FIT ;
TITLE "Monitoring Incoming Pictures" ;
MODAL ;
OPTIONS GetOptions ;
EVAL {|o|oTimer:=DC_SetTimerEvent():new(60* 100,;
{||guirun({||OptimizePoll(getlist,cAuction,lCreateDetail,lCreateThumbs,alltrim(cMonitorDirectory),alltrim(cDirectory)) })} )}
dc_setTimerEvent()
dc_setTimerEvent()
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Re: dc_setTimerEvent()
Brian -
You are right! This should fix it:
In _DCFUNCT.PRG change METHOD DC_SetTimerEvent:TimerLoop() as shown below.
Then rebuild DCLIPX.DLL by running BUILD19_SL1.bat or BUILD19.bat. This fix will be in build 255.
Let me know if you want me to send you a compiled DCLIPX.DLL.
You are right! This should fix it:
In _DCFUNCT.PRG change METHOD DC_SetTimerEvent:TimerLoop() as shown below.
Then rebuild DCLIPX.DLL by running BUILD19_SL1.bat or BUILD19.bat. This fix will be in build 255.
Let me know if you want me to send you a compiled DCLIPX.DLL.
Code: Select all
METHOD DC_SetTimerEvent:TimerLoop()
LOCAL nCount := -1, nSleep
DO WHILE ::interval > 0
IF nCount >= ::interval .OR. nCount == -1
Eval(::evalBlock)
nCount := 0
ENDIF
IF ::interval < 100
nSleep := ::interval
ELSE
nSleep := 100
ENDIF
Sleep(nSleep)
nCount += nSleep
ENDDO
RETURN nil
The eXpress train is coming - and it has more cars.
Re: dc_setTimerEvent()
Roger, a compiled dclipx would be wonderful..rdonnay wrote:Let me know if you want me to send you a compiled DCLIPX.DLL.
What is your planned timing on a 255 release ??
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises