Friday, January 21, 2005

Sleep Fox

Put VFP in a minimum resource wait state, but still pay attention to the internal event loop:


PROCEDURE DoSleep
LPARAMETERS tnSeconds
LOCAL lnSeconds
DECLARE Sleep IN WIN32API integer

lnSeconds = SECONDS()
DO WHILE SECONDS() - m.lnSeconds <> m.tnSeconds
    SLEEP(m.tnSeconds*100)
    DOEVENTS
ENDDO
CLEAR DLL SLEEP


Thanks to late night buddy
Garrett who has a recent post on using SourceGear Vault with VFP Project Manager. The single user version is free (as in beer).

2 comments:

Anonymous said...

Sorry, this comment is not in relation to the entry. But as Ifound no email address, this seemed to be the only opportunity. I just ran across your post http://detah.blogspot.com/2004/01/tpc-h-after-few-days-of-research-i.html
as I'm trying to set up tpc-h on a windows machine without success. You wrote that you managed it somehow. Your help would be greatly appreciated! Compilation always gives me the error: conflicting types for getopt. In the makefile I changed DATABASE=DB2, MACHINE=DOS, WORKLOAD=TPCH, OBJ=.c, EXE =.exe, LIBS=[blank]. I got no clue, google brings up nothing...
Here is my email, in case you want to reply: LPFSXXTSSSKZ@spammotel.com

-dta said...

I've sent the changed files via email.