>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