Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time of the servers
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00392588
Message ID:
00392913
Views:
12
>Larry, Ed
>
>First of all thanks for your replies.
>
>Well, I'd already did the that function and it works reasonably well (there is a fluctuation of +1/-1 secs, but is ok for me because I don't need more accuracy than that) and is also reasonably fast (it checks the gap in .005 secs).
>The problem with this approach is: the function that needs that info (it checks that several other programs are running, issuing a warning if they're not) is called many times per second. But the same function can be called from other programs just once or a random number of times.

If the time it takes for a file to be createdseems excessive, and all servers are Win32 systems (the OS is Win9x, WinNT or Win2K), there are lots of other ways to do this - for example, each server might offer access to a COM server via DCOM; the object might offer a method which sent back the current time and date when called. If all clients used NT or Win2K, the NetRemoteTOD() API call willget the current system time from a server, but it's not available under Win9x. And you could also use the command line NET TIME console app to query the server for the time, but it often will take even longer to access.

>I can solve this problem passing a parameter to tell the function if it must get the gap, and then each caller program can take the proper action (ie. only ask to check the gap every n seconds/minutes/hours) But in order to accomplish this I must rebuild various projects, something I wanted to avoid.
>Anyway I think I will take this approach on monday and close the case.
>
>Thanks again, and I hope that what I wrote is clear, I'm not convinced I can understand it!
>
>Hugo
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform