TimeServ 1.55 - Time Service

for Windows NT 3.5 or later

by Douglas W. Hogarth, with help from Arnold Miller
Copyright © 1995-1998 Microsoft Corporation. All rights reserved.


Contents

Introduction
Installation instructions
Starting TimeServ
Checking Status
TIMESERV.INI Settings
Disclaimer
Accuracy Information for Windows NT
Event Log entries
Common Questions
Supplemental instructions for using TimeServ with board level (ISA) devices
Miscellany

Introduction

Contents

This document describes the TimeServ program included in the Windows NT 4.0 Resource Kit. This is a service with two main goals. The first goal is to be able to set the system time of Windows NT accurately from a variety of sources. The second goal is to help synchronize the time easily between multiple machines on a Local Area Network. (Links embedded in this document require access to the Internet.)

To set the time accurately, TimeServ can access the following sources:

by modem:

National Institute of Standards and Technology ACTS
US Naval Observatory
National Research Council Canada INMS
BBC Radio Time Standard Dial-in Time Service
Computime from Telstra
TUG/PTB/Precision Timing/IEN/Netherlands (and others)
New Zealand's MSL

by Internet TCP/IP:

Simple NTP
US Naval Observatory
National Institute of Standards and Technology

Heath "Most Accurate Clock" GC-1000 or GC-1001 (WWV(H))
Spectracom NETCLOCK/2(R) (WWVB)
Hewlett-Packard's GPS receivers
TrueTime's TimeLink (WWV(H)) or PC-SG2 or serial format
Arbiter Systems serial broadcast format, and 1082A/1091A
(coming soon) Ultralink's WWVB products
Trimble GPS receiver
Rockwell GPS receiver
Motorola GPS receiver
Bancomm bc620AT, bc627AT (GPS-based), bc630AT, or PC03XT

To synchronize the time easily, TimeServ can access the time from other Windows NT machines or many other machines running networking software from Microsoft. A machine can synchronize from a "primary" source (one server or a list of specific servers), or a "secondary" source. A secondary source is defined as a machine within a domain/workgroup which sets the "timesource" bit, and there is a feature in TimeServ which allows easily setting this bit on a Windows NT machine.


Installation instructions

Contents

1) COPY TIMESERV.EXE and TIMESERV.DLL to %SystemRoot%\system32.
2) COPY TIMESERV.INI to %SystemRoot% (typically c:\winnt, NOT system32)
3) EDIT TIMESERV.INI as necessary (see below for details)
4) Log on with administrator privileges, if not done already
5) Run TIMESERV -AUTOMATIC or TIMESERV -MANUAL, depending on how you want the service to start
*) TimeServ requires Windows NT 3.5 or later to operate. An error message would be expected if trying to run under Windows NT 3.1.


Starting TimeServ

Contents

After performing the above steps (with -automatic), a reboot would start TimeServ. TimeServ runs as a service, so you do not need to be logged on. If you specified -manual, you must start TimeServ by using the Control Panel, then Services, selecting Time Service, and then pressing the Start button. You can also use this interface to change the startup type, or stop the service. If you decide to edit TIMESERV.INI later, you must stop the service and run TIMESERV -UPDATE from a command line since the actual parameters are stored in the registry.


Checking Status

Contents

When TimeServ is running, it places any errors, warnings, or other information into the Application log in the Event Viewer. Therefore you should start Event Viewer and select Application log to review the operational status. If there are no events in the log, TimeServ should be running fine. If desired, an option is available to write an event in the log for successful sets (Log=yes in timeserv.ini). Although the event description should be self-explanatory, more information appears later in this document.

Of course you should also perform a sanity check on the operation and system time. If you are setting the time by modem, watch for the modem to operate. Check the time after around a minute, looking for any change. It should be accurate, and this would be easy to detect if the time was not accurate before. Also check the date. If the time/date are off by an hour or more, you probably have your time zone set incorrectly in the control panel and this needs to be corrected if you expect TimeServ to function properly.


TIMESERV.INI Settings

Contents

Since TimeServ has multiple modes of operation, it is important to edit timeserv.ini to properly describe the necessary settings. This section of the documentation will give the background necessary. Although you might want to read each detail, you can typically skip modes not related to your desired mode of operation.

The default timeserv.ini file is set up to dial the United States "atomic clock" using a standard modem attached to COM1, and repeat this operation daily. It is set up to dial the number as long distance, without a PBX (9) dialing prefix. The file should be loaded into a text editor and there are remarks which describe various sections. A knowledgeable user can inspect the file and remove the semi-colon (;) from in front of the desired line, placing it before any unused lines. For example, the following is in the default file:

;Prefix=9,
Prefix=

If your phone system requires dialing 9 to obtain an outside line, simply change the two lines as follows:

Prefix=9,
;Prefix=

After TimeServ runs and you check the status as described above, please realize that TimeServ continues to run and will periodically reset the time (with the process sleeping but boosting priority during the time set). If setting by modem, the reset can take place daily around 6:00am local time (for lowest long distance rates). This is done with the defaults in timeserv.ini - the first call occurs immediately, the second call occurs between 6:00 and 6:30am, and remaining calls occur every 24 hours after that. If GC-100x, default resets occur around every 1.5 hour. If bc620AT, default resets occur around every fifteen minutes. Default network resets occur two or three times daily, but include a randomizer which adds up to ten additional minutes. If you wish to change from the defaults and set the time every twelve hours starting immediately, simply edit timeserv.ini to change Period from 0 to 2.

NIST ACTS is a service from the National Institute of Standards and Technology operated from Boulder, Colorado. A modem answers at 300 or 1200bps (or higher) and supplies UTC in ASCII. Measurements can be made of line delay so that the "On Time Marker" arrives within 10ms (typically it is more accurate, and will be +/-2ms relative time when using the same modem). The call is typically long distance and less than 30 seconds. The above specification is for 1200bps, but we use 300bps hoping for +/-1ms absolute.

USNO is a service of the U.S. Naval Observatory. It only operates at 1200bps, and requires a modem with Remote Digital Loopback (RDL) features using &T6 and related AT commands. The location is Washington, D.C. (it would make sense to try USNO if that is a local call for you).

INTERNET is an alternative way to access NIST; it uses TCP/IP. Since the Internet is a WAN, it is not uncommon to see quarter- or half-second error. See also NTP, another Internet type.

NTP is the Network Time Protocol, using IP usually over the Internet. TimeServ only uses a Simple adaptation of NTP, so should not to be confused with the accuracy and reliability of the full NTP. An NTP server must be specified (there is no default). (NTPServer=BroadcastClient and MulticastClient are reserved.)

NRC is a service of the National Research Council Canada INMS. It only operates at 300bps, and supports propagation delay measurement. The location is Ottawa (it would make sense to try NRC if that is a local call for you). (There is a similar service in Toronto, but it uses local time rather than UTC so won't work correctly.)

BBC is the BBC Radio Time Standard Dial-in Time Service over PSDN. It only operates at 300bps, and supports propagation delay measurement. The call is a Premium Rate service (British Telecom Callstream). The telephone number specified should be for the UTC Leitch Clock System Controller (not the UK TOD number) - otherwise a one hour error will occur in Summer. The source for the Controller includes MSF (Nat.Phys.Lab.) and GPS receivers. Do not confuse this Type/PhoneNumber with the one for NPL's "TRUETIME."

Mexico and Brazil have services similar to NRC/BBC but do not supply the date and do not allow delay measurement. Brazil only offers local time (rather than UTC) so it should not be used outsize that time zone.

Computime is Telstra's dial-up time service over PSTN. It only operates at 1200bps, and does not support propagation delay measurement. TimeServ adds 45ms to the time received as an attempt to adjust. Important: you must choose a PSTN number which matches your State, because local time and date are used (rather than UTC) - this means that the time set will be many hours off if you call from a country such as the USA.

EUROPE is a name given to the common format used by services such as Sweden's Precision Timing Stockholm (Domestic), Austria's TUG, Germany's PTB (Physikalisch-Technische Bundesanstalt), Italy's IEN (Istituto Elettrotecnico Nazionale), a service in the Netherlands, and others (such as Belgium). They operate at 1200bps, and propagation delay measurement is not done for Italy. The locations are Sweden, Austria, Germany, Torino, and the Netherlands (it would make sense to try EUROPE if that is a local call for you). Note that Italy's number is user-paid-service, and Sweden's number is a premium number (they can only be dialed from within their country). UK users should not confuse BBC's Type/PhoneNumber with this one (a BT Premium Rate number used by NPL). Belgium is another country that should be compatible.

MSL is New Zealand Measurement Standards Laboratory computer time setting service. It operates at 1200bps and propagation delay measurement is not done. The call is an 0900 service and therefore costs around $1.50 incl. of GST (it can only be dialed from within New Zealand).

Heath GC-1000 Most Accurate Clock is a WWV(H) radio receiver clock which supplies time in ASCII to tenths of seconds. The clock should be set to local time, 9600, with propagation delay set, either 12 or 24-hr mode, and AUTO mode. The Hi Spec LED should come on from time to time (tenths of seconds should not be dim). It should be hooked to the PC by a "null-modem" cable. The program is coded for accuracy of +/-24ms (observed, though the spec of the clock/radio is +/-10ms), and prefers that the clock does not have "one second delay" enabled (if enabled, it takes a few seconds longer to set the time). If necessary for some reason, the clock can be set to NORMAL (rather than AUTO) mode, although results are slightly less accurate. GC-1001 is the Most Accurate Clock II, which has various time features (but not date). It should be hooked up as documented in the manual, can be set to either local or UTC, and should have received the time before starting TimeServ.

Spectracom Corp.'s (East Rochester, NY) NETCLOCK/2 is a WWVB radio receiver clock which supplies time code in ASCII format with +/-3ms accuracy. The clock should have propagation delay (and receiver delay) set during initial setup, and the cable connection can be made either to the serial comm port, a TimeTap(tm), or the remote output RS-232 special pins. The recommended settings are 9600 baud and data format 2 if you have a choice, which allows highest accuracy and does not have any time zone/DST/year issues (note that format 2 is only available from the serial comm port). However, formats 0 and 1 are also supported, and other baud rates (such as 4800 or 1200) are supported (automatically). If using format 0 or 1 and local time (rather than UTC), you must have the proper settings for time zone and Auto DST (i.e., they must match the equivalent settings in Windows NT). Format 0 also requires that the year be set properly on the computer (manually). If using format 1 and UTC, you must set Windows NT to GMT (and match the Auto DST settings). Although not tested, the older Model 8170 clock and newer NETCLOCK/GPS should be compatible.

HP is Hewlett-Packard's 58503A GPS Time and Frequency Reference Receiver. It should be hooked to the PC using an RS-232 cable and set to the default communication settings and 9600 or 19200 baud. Although not tested, the 59551A might also be compatible.

TimeLink is the TL-3 WWV(H) receiver from TrueTime (Santa Rosa, CA). It should be hooked to the PC using an RS-232 cable and set to the default 9600/N/1, with propagation delay set, and not Mode C or any Update Interval. It can be either 12 or 24 hour format, and either UTC or local time zone (if local time zone, the time zone and DST settings must match the equivalent settings in Windows NT).

Type=TrueTime specifies to use TrueTime's Serial I/O format as found on units such as their Mark II (later units such as the XL-DC can typically enable "emulation mode" for compatibility, or keep continuous time once per second enabled with the default output format). The baud rate must be specified with Speed=, and the word size/parity should be 7/E although 8/N is reported to work. The hardware must be outputting UTC (not have a time zone offset).

Type=Arbiter specifies to use Arbiter Systems' serial Broadcast Mode-Extended ASCII (Broadcast Data-UTC) as found on units such as their 1088A/B. The baud rate must be 9600 and the word size/parity should be 8/N. Users of such hardware should add /NoSerialMice:COMx to the end of the appropriate line in their \boot.ini (where x represents the appropriate digit).

Type=Ultralink is not supported yet, but will specify to use Ultralink's WWVB products.   These products are more like a "receiver" than a "clock" which means that TimeServ must keep the specified communication port open continuously and there will often be a delay from the specified period before TimeServ actually sets the time.   TimeServ requires quality 3 or better, some leap flag, and less than one hour drift.

Type=AMDAT specifies to use the ADC-60 MSF/DCF77 receiver. The code was tested only by a customer.

Type=MOBATIME specifies to use the IF482 Mobaline DCF77 receiver. The code was tested only by a customer.

Type=Radiocode specifies to use Radiocode Clock Ltd's Type 2 format from a variety of receivers. It should be set to 9600 baud, 1 stop bit, and not the automatic once-per-second. This code was tested only by a customer, using the RCC-8000 MSF receiver.

Type=NMEA specifies to use the NMEA "ZDA" sentence from a device such as a GPS, at 4800 baud. Accuracy results will vary, depending on factors such as whether other NMEA sentences are disabled.

Trimble is a GPS receiver protocol from Trimble Navigation (TSIP over RS-232). It exists on receivers like the Acutime and MobileGPS. Note that the time might not be set immediately - it might take GPS around 15 minutes to acquire the information (during which time the COM port will remain used).

Rockwell is a GPS receiver protocol from Rockwell International (messages over RS-232). It exists on modules like the NavCard. Note that the time might not be set immediately - it might take GPS around 15 minutes to acquire the information (during which time the COM port will remain used). (We don't perform a manual cold start.) Their newer receiver protocol such as found on their Jupiter board is specified by Type=Zodiac (users of such hardware should add /NoSerialMice:COMx to the end of the appropriate line in their \boot.ini).

Motorola is a GPS receiver protocol from Motorola (binary format over RS-232). It exists on receivers like the 8-channel Oncore with timing options. The receiver must not be in LORAN format, and will be forced to position fix mode, application type static (to speed up acquisition), no GMT offset, UTC, polled position output, and T-RAIM enabled. Note that the time might not be set on the first pass (if the receiver isn't yet accurate to the microsecond). Although not tested, the 6-channel Oncore and a "TAC" might be compatible.

bc620AT is an ISA card from Bancomm Division of Datum Inc.(San Jose, CA) which has a timer with resolution to microseconds. Typically it is hooked up to GPS (Acutime) for accuracy within microseconds ( such as in the bc627AT package), or some time code source such as IRIG. It requires the device driver (see below). The bc627AT is well tested; the bc620AT assumes that the timecode is UTC unless a local offset is programmed and is less tested.

Type=bc630AT specifies to get the time from this Bancomm ISA card. The code has some testing. It requires the device driver (see below). A parameter Local=yes can be specified if the timecode is local. Typically the battery-backed values are used for settings, but the bc630AT\OpMode key will be loaded into the Time Code Select Byte if present (for example OpMode=0 will select auto detect, 4 will select RTC, and 5 will select Master).

Type=PC03XT specifies to get the time from this Bancomm ISA card. The code has some testing. It requires the device driver (see below). A parameter Local=yes can be specified if the timecode is local. It assumes forward (increasing) code on input channel 1. If the time code is not IRIG B, the PC03XT\OpMode key must be set to the time code type (1=IRIG A, 2=IRIG G, etc).

Type=PCSG2 specifies to get the time from TrueTime's PC-SG2 or GPS-PC ISA card. It requires the device driver (see below). The configuration of the board can be set up using MS-DOS if necessary. Ideally the "local offset" of GPS-PC should be set to 0; TimeServ can automatically use the time zone from Windows NT. If a "local offset" is programmed for the GPS-PC, it must be the same time zone (and DST settings) as specified in the normal Windows NT Control Panel. For non-GPS PC-SG2 (IRIG), the input is assumed to be UTC unless the user adds a line "local=yes" to their TimeServ.ini file (in which case the time zone and DST settings must match Windows NT settings). For their PCI card, the "truetime.sys" driver is required to be installed (instead of the other device driver below).

Type=8291A specifies to get the time from Arbiter's 1082A or 1091A ISA card (with firmware from April'98 or later).  It requires the device driver (see below).  A parameter Local=yes can be specified if timecode is local.  The code has only a small amount of testing.

Type=PCLTC specifies to get the time from Adrienne Electronics Corp.'s PC-LTC/IOR ISA board. It requires the device driver (see below). This board reads longitudinal video time code. The code attempts to support both SMPTE and EBU, drop-frame or non-drop-frame. Additional parameters relating to this type are FPS=25 | 30, to specify frames per second as EBU or SMPTE, Local=yes | no to specify whether the timecode is local or UTC, and LocalOffset=x (where x is a positive or negative number of hours) to specify non-UTC timecode which is not from the same timezone (for example, LocalOffset=-3 means use an Eastern timezone generator for a PC in the Pacific timezone). Note that this type sets only the time, not the date. The code was mainly tested by a customer.

Type=Atomic specifies to use a 1PPS signal hooked to the Carrier Detect pin of a serial port to round the time to the nearest second. Of course this requires that the time be set to within a half-second by some other method. This code has only a small amount of testing.

The PRIMARY and SECONDARY modes of operation are meant for synchronization of time over the network. The strict definition of PRIMARY is that it obtains the time from any server specified in a PrimarySource list using the "NetRemoteTOD" feature of Microsoft LAN API, and SECONDARY obtains the time from any "TimeSource" in the current domain/workgroup (or specified SecondaryDomain). TimeSource is a server feature which can be set by TimeServ (simply edit timeserv.ini so that timesource=yes and run TimeServ -update). The synchronization is most accurate when accessing other machines running Windows NT, but also works with other machines such as Windows 95 and Windows for Workgroups 3.11. It is also desirable to set the time from a LAN rather than WAN, although we attempt to adjust for different timezones and delays.

The intent is to set up a multi-tiered distribution for accurate, synchronized time. The top level machine would run TimeServ in some mode other than PRIMARY/SECONDARY, such as obtaining the time via modem. This becomes the new master of time. That server is placed on a LAN and its name should be specified in some other timeserv.ini as the PrimarySource (the default name in that file is \\timesource). A server in each domain could then run with type=primary and timesource=yes in their timeserv.ini. Finally, any clients at the bottom of the tier could run with type=secondary, or use the NET TIME command. If you wish to synchronize a client which cannot run TimeServ, check your client documentation - there is often a command available such as NET TIME \\servername /set /y (where servername is the name of your server).

Both primary and secondary support multiple servers - primary through a list in timeserv.ini and secondary through as many machines in a domain which have timesource specified. When working with the primary list, TimeServ can start with the first entry or a random entry (configured by the RandomPrimary entry in timeserv.ini), and sticks with that server until it is no longer available (or TimeServ is restarted).

Remember, TimeServ is not an actual server and therefore type=primary does not specify that you are some primary time server. Rather, type=primary means that the time is obtained from a named server, which is typically higher up on a tiered distribution system.


Disclaimer

Contents

Many of all of the time-by-modem services reserve the right to discontinue or charge for their service at any time, and telephone companies reserve the right to change rates. Also the following accuracy information is intended to be correct, but the suitability of TimeServ for your specific purposes should be tested and determined by you.


Accuracy Information for Windows NT

Contents

A default entry in timeserv.ini is TASync=no. This is one of the main reasons that TimeServ is not supported for Windows NT 3.1. It specifies that the TimeAdjustment flag in the system should be fixed and skew compensation allowed. By default, Windows NT regularly syncs the time to the CMOS RTC (on 3.51 or later it only does this when time is off by at least one minute). By specifying this option on the first time set after each boot, the clock will run using only the 8254-based timer which has greater precision and can result in greater stability. In this mode, skew compensation is possible (for error in the rate of the system timer). Of course, if CMOS sync is not disabled, the long term clock will take on the characteristics of the CMOS RTC with poor precision. Assuming that CMOS sync is disabled and using the popular i486 or uniprocessor Pentium CPU type, setting your time daily should result in a clock with maximum +/-.45 second error (twice daily +/-.22s, four times daily +/-.10s, etc). These figures are for TimeServ obtaining the time from a non-network source. Detailed skew compensation is not normally attempted when using a network source because of inconsistent delays over the network. In such cases if you notice time drifting more with TimeServ than you had experienced before, you might want to set TASync=yes.

Warning: For skew compensation to work properly, you should never set the time manually while TimeServ is running. If you must set the time manually, either stop the Time Service first (and restart it after, if desired), or set TASync=yes.


Event Log entries

Contents

Informational - this class of events does not represent either an error or warning. The time was set accurately, and typically no action is necessary.

Time set (offset < .5 second)

This optional entry is created upon each successful time set, if the clock error is less than one-half second. The option is enabled by Log=yes in timeserv.ini (the default is Log=no).

Registry LanmanServer\Parameters\timesource is not set, maybe it should be

This entry is created the first time the service runs in many cases. It is meant to point out that a machine on a network which is setting the time accurately or getting the time from a primary source should be letting the network know that it is an accurate source of time. In order to set the entry, simply edit the timesource entry near the end of timeserv.ini and run timeserv -update (it is necessary to stop and restart the server, also).

Changing TimeAdjustment from default increment (to compensate for skew)

With the default TASync=no, it is possible for TimeServ to correct certain errors in the rate of a clock (which we call "skew"). This message is notifying that such a correction was made. See the detailed discussion of the TASync setting for details on how this works.

ISA card is flywheeling (not tracking), or not sync'd / stable

A Bancomm board has features to specify whether it is tracking a timesource and how accurate it is. This is an informational message since microsecond accuracy isn't used and there is another event to flag that the time is not set. Other boards have similar features.

Potential for skew compensation disabled because period is too frequent

This message indicates that there might be a correctable error in the rate of the clock, but the time is being set too frequently to trust the correction computation. For most purposes, it is reasonable to only set the clock once or twice per day and this will allow an effective calculation of the error in rate of the clock.

A leap second seemed to be inserted within the last 24 hours

From time to time, an international organization determines that a leap second should be inserted in order to help keep UTC and UT1 in sync. It is usually the last second on June 30 or December 31, and lately has been done around every 1.5 years. This message simply notes that such an event seemed to occur. The time will be set, and the program will ignore the apparent one second error in any further computations.

Time set (offset > .5 second)

This optional entry is created upon each successful time set, if the clock error is greater than (or equal to) one-half second. The option is enabled by Log=yes in timeserv.ini (the default is Log=no).

Skew >30 seconds per day - compensation not attempted

This message indicates that TimeServ noticed the error rate of your clock is larger than normal for any PC., so it will not attempt any compensation. The accurate time will still be set, but the clock will accumulate error between each time set.

The specified NTPServer supports RFC-868(Time)

This message follows a warning that an NTP server did not respond. It indicates that the specified server did respond to the Time protocol (RFC-868). TimeServ understands the alternative protocol, but does not currently set the time from it. Therefore it is still necessary to investigate the previous warning.

Warning - this class of events typically keep the Time Service from setting the time accurately, but might be a temporary condition. Study the details in case there is an underlying problem which can be corrected, or wait until the next time set to see if the warning continues.

NETCLOCK/2 lost phase lock for >13 minutes - check antenna

This message indicates that the Spectracom clock is operating and has the time, but has not received a radio signal within the last 13 minutes. This reduces the accuracy of the clock, and you should check the antenna to see if a signal can be received more often. Since the accuracy is still within 10 milliseconds, the time is set.

The NETCLOCK/2 time is not set by WWVB yet, or lost signal for > 1 hour

When the NETCLOCK/2 is first plugged in, it must receive a signal from WWVB to set the time accurately (the display might show a time from SmartWatch(tm) or a manual set, but that has low accuracy). This message indicates that the clock does not know the time, or knows the time but has not received WWVB for over an hour (which reduces accuracy beyond 50 milliseconds). This is a warning rather than error because the time will presumably be available later. Of course if it repeats, you should fix the Spectracom clock (maybe the antenna).

Couldn't reach NIST by Internet (maybe blocked by firewall)

This message appears if there was no response from an Internet server. Verify that you are not cut off by a "firewall." Try to telnet 132.163.135.130 13. It should respond if you have proper Internet access via TCP/IP.

The NTP server didn't respond

This message appears if there was not a full response from the specified NTP server. If you cannot set time by NTP, try to ping the specified NTP server (to make sure that you are not cut off by a "firewall").

The NTP server isn't sync'd, time not set

This message appears if time was obtained from an NTP server, but it indicated that the server might not have accurate time. The time is not set, since it is better to be safe than sorry.

The receiver isn't sync'd to UTC

This message appears if unable to obtain the time from a GPS or radio receiver. Although it will be tried again later, this might indicate that the GPS antenna's view of the sky is obstructed or the radio antenna isn't picking up the signal.

Attempt to set time which differs by more than 12 hours aborted

This message appears if a "sanity check" on the attempted time set fails. Although the first set by TimeServ after it starts allows large errors to be corrected, any later sets should have very small error. If you receive this message, there might have been a failure in the transmission of time or some unexpected programming error. If someone manually set the system time incorrectly (such as a wrong date), correct it manually or stop/restart TimeServ.

The reference and system don't appear in sync with DST change, time not set

Most modes of TimeServ use UTC time and therefore are not affected by the change to/from Daylight Savings Time. However, the Heath clock and Computime (Australia) modes use local time, and the Spectracom clock has the option to use local time. This message indicates that the reference clock (Heath or Computime or Spectracom) changed their setting at a different time than computed for the system clock of Windows NT. The message will repeat until the two clocks are in sync, and then the time will be set again; this avoids any gross error. For example, the Heath and Spectracom clocks typically switch to/from DST at 00:00 UTC (actually a couple minutes later if signal is received perfectly), but the change in the US is around 02:00 local time.

Can't open serial port (it may be in use).

TimeServ keeps the serial port closed when not in use. If some other application has the serial port in use at the time when the Time Service attempts to use it (such as to dial a modem), this message will be logged. It is expected that the situation is temporary - if the messages repeat, correct the problem by adjusting either the schedule of TimeServ or the other application sharing the communication port.

Modem timeout - might be BUSY

This message indicates that the Time Service did not receive the expected answer from the modem, a common cause would be a busy signal. A repeat call is attempted immediately. If this message continues to appear, there may be some other problem such as an incorrect phone number.

Line noise was detected in the info (or it is a leap second), time not set

Most services allow TimeServ to obtain two time "strings" in a row, so that they can be compared to avoid incorrect time setting due to transmission errors. This message indicates that such a transmission error was detected. The time is not set, since it is better to be safe than sorry. If this message continues to appear, there may be some other problem.

Timeout occurred with the GC-100x, recovery is possible (if present)

In developing TimeServ with the Heath clock, a situation was encountered which can be worked around. This message indicates that the Heath clock is either not connected, or the workaround was attempted.

The GC-100x time is not set by WWV(H) yet

When the GC-100x is first plugged in, it must receive a signal from WWV or WWVH to set the time. This message indicates that the clock does not know the time. This is a warning rather than error because the time will presumably be available later. Of course if it repeats, you should fix the Heath clock (maybe the antenna).

GC-100x hasn't received a signal in over 24 hours - check antenna

This message indicates that the Heath clock is operating and has the time, but has not received a time signal in over 24 hours. This reduces the accuracy of the clock, and you should check the antenna so that a signal is received more often.

NetRemoteTOD failed for each PrimarySource

The function used to obtain the time from a network machine is called NetRemoteTOD. This message indicates that we tried each server listed in timeserv.ini but failed each one. This may mean that the network is down, server(s) are down, or maybe the list was specified incorrectly (each server name should have \\ in front of it).

Couldn't find a timesource in SecondaryDomain

This function indicates that no servers have specified the timesource parameter in the domain/workgroup specified in timeserv.ini. The network or server may be down, but be sure to read the discussion of the timesource setting elsewhere in this document. If this error doesn't make any sense, review one of the common questions, below.

NetRemoteTOD failed

The function used to obtain the time from a network machine is called NetRemoteTOD. This message indicates that it failed on a server which claimed to be a timesource in the domain/workgroup.

It has been over 24 hours since we got a network success

Although it might be acceptable to have a network problem on some attempts, this message indicates that all attempts for the previous day have failed (or the very first attempt failed). The situation should be studied and corrected (perhaps in conjunction with any earlier events in the log).

Couldn't measure the line delay (accuracy is reduced)

To achieve the highest accuracy when setting the time by modem, it is often possible to measure the delay in the phone line between the two modems. This message indicates that such a measurement was not possible and the accuracy is reduced. The reduction in accuracy is usually minor, unless you are calling overseas. The most common cause for this message is probably a detail of the modem used - for best results you should have a real modem with settings for a "dumb" connection (no compression/error detection or "autobaud"). Sometimes trying speed 1200 (instead of 300) works and if so, you should keep speed set to 1200.

ISA card doesn't have day of year set, so time not used

A Bancomm board (or other ISA card) needs a source of time, and sometimes that source isn't ready immediately when the PC boots. This message indicates our attempt to ignore any attempted time sets before the source has given the time to the Bancomm board. It is determined by the fact that the board starts up with day 0 or 1, so except on New Year's Day there would not be any real day number until the time is set (or 24 hours elapses). Wait the expected time and then check for continued errors.

Difficulty measuring network delay, check the link to your server(s)

This message means that an attempted measurement of the delay between the machine and the time server on the network could not be computed reliably (consistently). If you are on a LAN, the time will probably be set slightly delayed.

Serial\RxFIFO is not 1, consider setting it to 1 for accuracy

This message can occur with any of the modes that uses the serial port to set the time. Many ports have a FIFO, often called a 16550A chip. It is a best guess by the program using the Event Log, so your should be sure to clear the Event Log if you ever remove the FIFO hardware. An enabled FIFO can cause the On-Time-Mark to arrive late. For best results, you should change the RxFIFO to 1 in the registry (SYSTEM\CurrentControlSet\Services\Serial\RxFIFO DWORD 1 - the default is 8). Note that with Windows NT 3.51 or later, if you have cleared your Event Log, this message might not appear by default ("LogFifo 0"). Regardless, for most accurate results you should change RxFIFO to 1.

NIST server is not healthy, try again later

The response from the NIST server on the Internet includes health status. This message indicates that there is a problem so the time will not be set.

Attempt to set date prior to 1995 aborted

This message appears if a "sanity check" on the attempted time set fails. If you receive this message, there might have been a failure in the transmission of time or some unexpected programming error. The time is not set, since the released version of TimeServ 1.1 didn't exist prior to 1995.

Could not create EventLog registry key (higher privilege needed?)

This message indicates an error when trying to place the information in the registry which is necessary to view the text of Event Log entries. It might mean that you need to log on with administrator privileges.

Error - this class of events are unexpected problems which keep the Time Service from running. You must correct the problem and restart TimeServ.

Could not set event message file
Could not set supported event types

These messages indicates a problem setting up the information to view details in the Event Log.

OpenSCManager failed
CreateService failed

These messages indicate a problem installing the service.

OpenProcessToken failed
AdjustTokenPrivileges enable failed (higher privilege needed)
AdjustTokenPrivileges disable failed

These messages indicate a problem obtaining the desired security level (or disabling it).

GetCommState failed
SetCommState failed
GetCommTimeouts failed
SetCommTimeouts failed

These messages indicate a problem configuring the serial port - make sure that the serial port is available.

The device timed-out (may be configured incorrectly or GC-1001 not set)

This message indicates that the radio clock or GPS may not be hooked up to the serial port correctly, or the Heath GC-1001 may not have received the time yet from WWV(H).

SetLocalTime failed
SetSystemTime failed

These messages indicate that Windows NT did not set the time (System time refers to UTC).

Close of serial port failed

This message indicates a problem closing the serial port.

SetServiceStatus failed

This message indicates a problem stopping the Time Service.

Unable to open the I/O Driver for ISA card

This message indicates that the Windows NT device driver necessary to access i/o ports is not available.

WNetOpenEnum failed

This message means that there was a problem enumerating the servers on the network.

Invalid socket (TCP/IP might not be loaded)

This message means that we could not create the Internet or NTP socket. A common reason would be that TCP/IP is not running.

gethostbyname failed for server (NTP or NIST)

This message means that a name (rather than numeric address) was specified for the NTP or NIST server, but the name could not be found by DNS. Check the name carefully, or specify a numeric address. If the name is correct, this might mean that you are cutoff by a "firewall."


Common Questions

Contents

If you receive an error 17 when trying to run TimeServ and cannot see the descriptive text in the Event Viewer Application log, you probably forgot to run TimeServ -automatic or TimeServ -manual (which is a necessary installation step to create certain registry entries). If you get the same error number but see the descriptive text, you might have placed your edited timeserv.ini somewhere other than the required %SystemRoot% (run TimeServ -update after moving the file if it was in the wrong location during attempted installation). That most common question comes from users who put timeserv.ini in a directory such as c:\winnt\system32 rather than %SystemRoot% (typically c:\winnt).   Another reason to get that particular error (if you are trying Type=Secondary) is that you are not running any machines in the domain with Timesource=yes (TimeServ does not default to getting the time from a domain controller, although the NET TIME command might).

If you use WinNT32 to update your installation of Windows NT, you may receive an error popup that the Time Service did not start. Press OK, and this error should not occur after the update is finished.

If you have trouble with Type=USNO, be sure that your ModemCommand includes whatever setting might be necessary for &T6 to work. For example, you need to include \N1 for some modems.

If you want your top-level windows to receive the WM_TIMECHANGED message, you must enable the "Allow Service to Interact with Desktop" checkbox in the dialog seen under the Startup button for Time Service using the Services icon of the Control Panel.


Supplemental instructions for using TimeServ with board level (ISA) devices

Contents

In order for Windows NT to access I/O ports, a device driver is necessary (which is not normally included). For the purposes of TimeServ, it is easiest to use a sample device driver from the DDK, called PortIO or GenPort. Like an exe or dll, there is a different file (genport.sys) for each processor architecture. The driver takes two parameters - the base port, and the number of addresses. For example, the default might be port 300h for 10h addresses for the bc62xAT and bc630AT, or port 320h for 20h addresses for the PC-SG2, or port 2A0 for 10h addresses for the PC-LTC/IOR, or port 300 for 20h addresses for the PC03XT, or port 200 for 8 address for Kallisto, or port 2F0 for 2 addresses for Arbiter's ISA cards.

To obtain the driver and data files, type "genport -d" from a command prompt after obtaining genport.exe from a place such as http://www.niceties.com/GENPORT.EXE.

To install the driver, be logged on with administrator privileges and copy genport.sys (for the appropriate processor architecture) to your %SystemRoot%\system32\drivers directory. Next, you must create certain registry entries. Be careful to follow the instructions exactly, because the registry is vital to the operation of Windows NT and the Registry Editor is powerful.

File-Run-REGEDT32 (or Start-Run if using the new Shell).
You should see four windows open on within REGEDT32.
Select the window titled HKEY_LOCAL_MACHINE on Local Machine.
Next you will double-click on a number of "keys" to expand down a tree:
First double-click on SYSTEM, then CurrentControlSet, and then Services.
Now use the Edit menu and select Add Key.
In the dialog box, type GenPort and then press the enter key (or OK).
Next, scroll down using the down-arrow key until GenPort is highlighted.
Now use the Registry menu and select Restore...
Enter the filename G30010.REG for the default bc62xAT or bc630AT (port 300, length 10), or the filename G32020.REG for the default PC-SG2 (port 320, length 20), or the filename G2A010.REG for the default PC-LTC/IOR (port 2A0, length 10), or the filename G30020.REG for the default PC03XT (port 300, length 20), or the filename G2F002.REG for the default 1082A/1091A (port 2F0, length 2).
After pressing the enter key (or OK), you will get a warning popup.
If you are sure that you had highlighted (selected) GenPort, press Yes.

If you need to specify a different base port, it is fairly easy to follow the above steps, then double-click on GenPort, double-click on Parameters, then double-click on the line to the right which says IoPortAddress. You can then enter a new value (in hex) and press the enter key (or OK).

Finally, use the Registry menu and select Exit.

Now shutdown/reboot the machine, and the device driver should automatically start (watch for any error).

If you attempt to run TimeServ with type=bc62xAT or =bc630AT or =PCSG2 or =PCTLC or =PC03XT (or PPSPort=Kallisto) without the above steps, you should get an error message stating that TimeServ was unable to open the I/O driver. Another way to verify that the driver installed/started correctly is to use Control Panel-Devices, and scroll down to the entry for GenPort (which should say Started Automatic). You can use the Startup button to disable the driver if necessary at some future point.


Miscellany

Contents

TimeServ keeps its settings in the registry under SYSTEM\CurrentControlSet\Services\TimeServ\Parameters.

Key Name: SYSTEM\CurrentControlSet\Services\TimeServ\Parameters

Value
Name: TASync
Type: REG_DWORD
;2=No, but uses "sticky" Adj value in registry and also implies "3" (since meant for gross errors).
3=No, but allows skew compensation for PRIMARY/SECONDARY/INTERNET/NTP types.

Value
Name: Period
Type: REG_DWORD
;FFFF=every two days, FFFE=every three days, FFFD=weekly

Value
Name: PPSPort
Type: REG_ASCIIZ
;\\.\COM1 means use 1PPS signal on RS-232 (CD) to set the minor time. bc620AT means set minor time from bc620AT. Kallisto means set minor time from Kallisto.

Value
Name: Mode
Type: REG_DWORD
;2=Analysis means gather stats (only sets time on first pass). Analysis mode will set the time immediately, then wait to periodically compare the time again. The skew, drift, and stability can be displayed.

Key Name: SYSTEM\CurrentControlSet\Services\TimeServ\Parameters\bc620AT

Value
Name: OpMode
Type: REG_DWORD
;0=Time Code Decode, 2=1PPS, 3=RTC, 4=GPS

Value
Name: TimeCode
Type: REG_SZ
;BM=IRIG B Modulated, BD=IRIG B DC level shift, etc.

Key Name: SYSTEM\CurrentControlSet\Services\TimeServ\Parameters\bc630AT

Value
Name: OpMode
Type: REG_DWORD
;0=Time Code detect, 4=RTC, 5=Master

Key Name: SYSTEM\CurrentControlSet\Services\TimeServ\Parameters\PC03XT

Value
Name: OpMode
Type: REG_DWORD
;0=IRIG B, 1=IRIG A, etc.


To TimeServ's home page (includes list of changes from previous versions and any changes in progress such as new/updated phone numbers)