Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speed fox test code
Message
 
 
To
05/06/2001 11:02:49
Mike Mattos
Nationwide Computers
Mississauga, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00515121
Message ID:
00517118
Views:
15
Any luck in resolving this problem?

>this code illustrates a delay problem, the "server" responds in about one second, the client takes about 5 seconds ! All suggestions welcome
>
>the test environment was to access the client from a different computer.
>
>
>SERVER
>
>CREATE TABLE servtab (t1 c(8),t2 c(8), t3 c(8), new l)
>use servtab shared
>DO WHILE reccount() < 10
> =sleeper(1) && sleep 1 second
> GO TOP
> LOCATE FOR new
> IF FOUND()
> REPLACE t2 WITH TIME() , new WITH .F.
> FLUSH
> ENDIF
>ENDDO
>brow
>use
>
>PROCEDURE sleeper
>PARAMETER secs
>DECLARE Sleep IN Win32API INTEGER nMilliseconds
>nmilliseconds = secs * 1000
>=sleep(nmilliseconds)
>
>
>
>CLIENT
>
>USE servtab shared
>DO WHILE RECCOUNT() < 10
> APPEND BLANK
> REPLACE new WITH .T., t1 WITH TIME()
> trecno=RECNO()
> FLUSH
> go top
> inloop=1
> DO WHILE inloop < 120 && exit after 2 minutes
> =sleeper(1) && sleep 1 second
> go trecno
> IF .not. new && if server processed record
> REPLACE t3 WITH TIME()
> flush
> go top
> inloop=121
> endif
> ENDDO
>
>ENDDO
>use
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform