FW using processortime

FW using processortime

Postby driessen » Tue Jan 30, 2007 5:02 pm

Hello,

How can I prevent that the next loop is using 100% processortime ?

This is the loop :

------------------------------
DO WHILE .T.
IF VActive
SYSREFRESH()
LOOP
ENDIF
EXIT
ENDDO
------------------------------

Thanks a lot in advance.

Michel D.
M&A Consult bvba
Genk (Belgium)
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Antonio Linares » Tue Jan 30, 2007 5:07 pm

Michel,

Try Sleep( 1 ) instead of Sysrefresh()
regards, saludos

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

Postby Otto » Wed Jan 31, 2007 5:01 pm

Couldn't you use a timer?
Regards
Otto
User avatar
Otto
 
Posts: 6353
Joined: Fri Oct 07, 2005 7:07 pm

Postby driessen » Wed Jan 31, 2007 11:01 pm

Antonio,
Otto,

Thanks a lot for you answers.

Antonio, sleep() is an unknown function in FW for Clipper.

Otto, I never thought of a timer. I'll try it out.

Thank you.

Michel
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Enrico Maria Giordano » Thu Feb 01, 2007 8:03 am

This is a working sample of Sleep() definition:

Code: Select all  Expand view  RUN
#include "Fivewin.ch"


FUNCTION MAIN()

    SLEEP( 2000 )

    RETURN NIL


DLL32 FUNCTION SLEEP( nMilliseconds AS DWORD ) AS VOID;
      PASCAL FROM "Sleep" LIB "kernel32.dll"


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8719
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby driessen » Fri Feb 09, 2007 11:45 pm

Thanks a lot guys.

I'll try out your suggestions.

Michel
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Antonio Linares » Sat Feb 10, 2007 7:00 am

Michel,

What do you use that loop for ?
regards, saludos

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


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 4 guests