Atomic Time

FREE!! Download version 2.2 w/source code (67k) FREE!!

peek at the source code...


Welcome to AtomicTime 2.2!

I hope you'll agree that this is the smallest, fastest, and most useful free Win32 internet time synchronizing program to date. And, of course, all the source code is available for free.

It synchronizes you computer's built in clock with the clocks of one or more free time servers on the internet. These time servers are all kept accurate to within 1 second of coordinated universal time, as maintained by an atomic clock.

What you need:

Installation:

The only file you need is AtomicTime.exe. Notice how small it is? 41k! Put it anywhere on your hard drive. There are NO system components, no restarting of windows, and there are no .ini files.

Running the program:

Run this one little file whenever you're ready by double clicking on it.

Press the "Correct NOW" button after the program is up and running. After a minute or so, you should receive data from several time servers on the internet that provide free time correction services based on a real atomic clock. You can scroll down the list to see which servers the program is still waiting on. If there is no response from any server after twenty seconds, the time data from that server will be ignored.

Next, you will be alerted that the program will choose the four best servers for you. It is unwise to use more than 4 servers, because takes longer and ties up your internet connection. It also floods the time servers with unnecessary traffic.

If you do not wish for the interface to come up, and instead want the simplicity of AtomicTime 1.1, check the CorrectOnLaunch box. The next time you launch the program, it will correct your time and exit after ten seconds. Should you wish to change any settings, double click on the icon in the system tray while it is running, and the main window will come back.

Troubleshooting:

If you do not see any info, something might be wrong with your internet connection. Try running a web browser. If you can't see web pages, then your net connection is not working.

If your time server connections are refused, you may be running through a proxy server. This is a problem. Your internet connection may be blocking all connections except for basic http style access. No time correction for you! (until you get a different internet provider)

If the time is off by more than a few minutes, chances are that the time zone or daylight savings settings are not set right on your system. Double click on the clock in the task bar, and look at the time zone info tab. If this is correct, you can manually force a local time offset to fix any problems.

If there is a time correction problem, the icon in the tray will turn into a yellow exclamation point. Double click on this to see the main window, and the problem will be in the latency column in the server list.

NOTE - when you log on to NetWare servers, your system clock is usually synchronized to these servers by the logon process. Most system administrators do not have the system clock set exactly right, so you may notice a large correction the instant after you log in.

Local Time Offset:

If you do not agree with the time correction provided, you can offset the clock by any amount of seconds, minutes, hours, or days. Enter fields in the Local Time Offset box such as: +1h, or -5m, or +0.2s.

Scheduled Correction:

If you would like AtomicTime to take it upon itself to correct the time for you, move the schedule slider. With the slider all the way to the left, no automatic correction happens until you press the Correct NOW button. Should you choose any other setting, AtomicTime will reload itself every time you restart Windows.

With the scheduler set to "Correct On Startup", the time will be corrected once every time the computer is restarted. After ten seconds, the program will exit itself.

The other settings will correct the time at specific intervals. Do not use any setting less than hourly if you don't need it. It ties up your internet connection, as well as the remote server's. Daily is typically a good setting.

Scheduled time corrections do not bring up the display window. Instead, they add an icon to your system tray near the clock. While the icon is animating, time correction is being computed. You can double click on this icon to see the details.

Customizing the server list:

To edit the servers in the list, right click on the server list window. A context-sensitive menu appears with options. Some options require that you select one or more servers with the left button first.

Note - you can also use IP numbers for server addresses, such as 128.114.28.2.

The most servers you can have in the list is 64.

You can sort the servers by name, latency, or correction by clicking on the column headers in the list. The default is to sort by reverse latency. This puts the slowest servers at the top.

Command Line Arguments:

This version does not use command line arguments like version 1.1. All the settings are controlled through the user interface window and saved in the system registry. The arguments 'u' and 's' are reserved for the program's internal use.

Uninstall:

Should you wish to take this program, and all traces of it off of your machine, got to the Settings, Control Panels, Add/Remove programs section of Windows, and remove "AtomicTime." If successful, a box will alert you that you can now delete the AtomicTime files. Press OK, and then kill all the AtomicTime files with the file explorer.

How Does it work?

It opens connections to port 37 on several servers. What comes back is the number of seconds since midnight on January 1st, 1900. This count is about 2 billion. It is normalized to your current time zone by your networking system.

It samples each sever seven times. Because of the way the internet is, some of the readings get stuck in transmission. To reduce this effect, it discards the three slowest responses, and averages the remaining four. This is how it approximates sub-second accuracy.

The latency you see is the average number of milliseconds for a round trip to the server. Specifically, it is the time between the acknowledgement of the connection and the first byte of data received. The time correction logic compensates by adding half of the round trip latency on to each suggested time correction.

When all the time deltas are in, it reads the local clock and changes it.

How accurate is it?

All I'm going to say here is less than 1 second. Internally, the program works entirely in milliseconds, but the port 37 calls it makes are only accurate to seconds. There is another time protocol called SNTP that uses UDP connections and is accurate to 10ms or so. Many internet users, including me, are behind a firewall and cannot make UDP connections to other servers. This was of no interest to me. Most PC clocks drift about 2 seconds per day anyway. If you really need more accuracy, there are other freeware programs that can do SNTP. AtomicTime did NOT have a problem with the year 2000. In fact, everything will work fine until 2036. Please check to see if I'm still alive that year, and if so, I'll make you an updated version.

Source code:

You need the Visual C++ 5.0 or later compiler. The 7 files are:
AtomicTime.cpp
source file
AtomicTime.rc
resource file
resource.h
resource include file
AtomTim1.ico
icon1
AtomTim2.ico
icon2
AtomTim3.ico
icon3
AtomicTime.dsp
VC++5.0 project
Please Do not ask me basic programming questions, or anything about Visual C++. This source code is here for people who can use it as-is. I would be curious to know what you end up doing with it.

Why Freeware?

Why not? I made this program for fun, and could care less about trying to make a few hundred dollars out of it. If you like it, send me email.

Here is more information about me - http://schmail/com/hireme

 

Future Versions:

Come check back here at http://schmail.com/atomictime from time to time.

Have fun!

- Tom Wuttke

This web page was made by hand with a text editor. Damn straight.