Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Support Applications
Message
From
15/05/2003 10:51:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/05/2003 10:34:34
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00788709
Message ID:
00788725
Views:
28
>I have a main application which supports multiple users. The main app is supported by several applications running on a server machine. The main app sends data to the support apps and waits on flags to be sent back that everything was processed. Until yesterday the main app only knew if the support was on or off by an initial flag sent by the support at startup. If an error occured in the support or it crashed the main app did not know and still thought it was running. So I came up with a datetime stamp. The support would send stamp to main app at certain intervals. The main app would compare its time to the stamp. If it got to a specified deficit the app knew it was down. All works okay except when the time on a user machine is not correct with the time on the server machine. Please help.

Either use a time from a common computer (ie: server) or record difference initially and use that to calculate.
On NT you could use NetRemoteTD to get server time.
Poor man's server time :
lcTemp=lcServerPath+sys(2015)+'.tmp'
lnHandle=fcreate(lcTemp)
=fclose(lnHandle)
adir(arrCheck,lcTemp)
erase (lcTemp)
lnApprxServerTimeInSecs = ;
 Ctot('^2000/1/1 ' + arrCheck[4]) - Ctot('^2000/1/1')
PS: Assumed no error and fast network.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform