If both the client and server are windows, and there are no firewalls etc. restricting access between them and assuming permissions are correct you could always call the OS "Net Time \\<server name>" command. However this is going to require you to parse the returned string and might not work for any of the above listed reasons.
If possible it would be easier to get both the client and server to synchronise with a time server (ntp or similar) as this should make the clocks fairly accurate. If you have control over both the client and server applications you could also pass timestamps back and fore as part of your API (i.e. on all requests the client sends its time and on responses the server returns the original request time and the current server time) - that way you could potentially handle time differences yourself.
Out of interest what does this application do that requires such accurate time keeping between networks applications?
I like the idea of running NET TIME, but Im not sure if that can be done in C#. I know that the Shell() command exists in VB, but not C#. Is there a way to do this in C# or do I have to go to VB? (VB used to be my main language, so I will have no problem using it again).
I cant use a time server, because there is a firewall at work and we cant get out to any.
As for the program itself:
Im the IT manager at a theme park for children. I do a lot of small programs for them, as Application Programming is my major in college and its my true passion. We are setting up this really cool light show to run automatically. I will be spending the next month programming the Light System to do all of these cool flashes/chases/etc to basically dance to the music that plays over our Audio System. (On a sidebar, programming a Light System for a theme park is cool as hell!)
At this current time, we have no way to link the Audio System and Light System, because they are two different companies and two different networks altogether. I will need to set up a computer with dual network cards to access both. I have a way to plug in a client computer to the Audio System and play music overhead without touching the actual server. I dont have a way to install a server application on the Light System, which is where the remote calls to the computer comes from.
As for the automation of the light system, I can tell it to play my show at specific times throughout the day and it will do it without a hitch. I need a way to play the music at the same time, which is where my application will come in. I want to query the server once an hour or so and update the time on the client computer. I know it seems a bit overboard, but this show needs pinpoint accuracy. I will already be compensating for time spent sending the message to the client to load the audio file and start the show. If I have the times exact, I will remove a "send start" from my design and just have a "send time". Then I am just that more exact.
*wipes forehead* Hope that helped =)
~Derek