home *** CD-ROM | disk | FTP | other *** search
- TIMEGEN.EXE
- Version 1.0
-
- A program for generating time signals in
- Naval Observatory format
-
- Copyright 1989
- Life Sciences Editorial Services
- 1236 River Bay Road
- Annapolis, Maryland 21401
-
-
- SHAREWARE NOTICE
-
- TIMEGEN IS NOT A FREE PROGRAM AND IT IS NOT GIVEN
- TO THE PUBLIC DOMAIN. IT IS SHAREWARE, WHICH
- MEANS YOU ARE REQUESTED TO COMPENSATE THE
- AUTHOR FOR HIS EFFORTS IF YOU CONTINUE TO USE THE
- PROGRAM. THOUGH REGISTRATION AND PAYMENT ARE
- EXPECTED IF YOU DECIDE TO KEEP AND USE TIMEGEN,
- THE PROGRAM IS NOT "CRIPPLED" IN ANY WAY TO
- COERCE YOU TO PAY BEFORE GETTING A FULLY
- IMPLEMENTED VERSION. THE FULLY IMPLEMENTED
- VERSION IS IN YOUR HANDS RIGHT NOW, AND IT IS
- ASSUMED THAT YOU ARE HONORABLE AND WILL PAY
- FOR IT IF YOU CONTINUE USING IT AFTER A 14-DAY
- TRIAL. DETAILS ON REGISTRATION ARE PROVIDED NEAR
- THE END OF THIS DOCUMENT.
-
-
- DESCRIPTION
-
- TIMEGEN.EXE is a program that generates and transmits time signals
- in Naval Observatory format to computers running Professional TIMESET
- (TIMESET version 5 or higher). The purpose is to make it unnecessary
- for all the computers in a local system to call the Naval Observatory for
- accurate time. Only one of the computers needs to do it. After that
- computer's clock has been synchronized with the Naval Observatory,
- TIMEGEN synthesizes accurate time data strings that other computers,
- calling it with Professional TIMESET, can use to set their own clocks.
- The benefit (for all but the relatively small number of people for whom
- the Naval Observatory is a local call) is that a single long distance phone
- call allows several computers to become closely synchronized with the
- cesium clocks of the Naval Observatory and with each other.
-
- The program should be especially useful for large organizations,
- especially those using computer programs that time-stamp data in files.
- For example, it would seem highly desirable for all the personal computers
- on a military base to be set to the same time. Likewise, all the branch
- offices of banks and other corporations probably need to have their
- computer clocks synchronized. The same goes for all the stations of a
- state police system. All such organizations now have that potential with
- TIMEGEN. In effect, the program allows organizations to create
- specialized computer bulletin boards to act as local "substations" of the
- U.S. Naval Observatory.
-
- Several options are available for defining the program's period of
- operation. It can be set up to run for an indefinite time, between specific
- times of the day, for a specified length of time irrespective of actual time,
- or continuously with periodic updates from the Naval Observatory to
- correct drifting of the host computer's clock.
-
-
-
- CONFIGURING THE PROGRAM
-
- TIMEGEN is a self-configuring program; that is, it writes your input for
- time zone, time season (daylight or standard), communication port number,
- and monitor type to its own source file on disk, thus eliminating the need
- for an external configuration data file. Your configuration becomes a
- semi-permanent part of the program itself. Reconfiguration is extremely
- simple, requiring only a switch on the command line to force configuration
- mode. There are only four substantive prompts to answer during
- configuration, and three of them require pressing only a single key.
-
- If your copy of TIMEGEN has never been configured before, it will
- automatically load in configuration mode the first time you run it. It
- seems unlikely that a copy you obtained from a computer bulletin board
- will not be configured, however, since responsible sysops usually test
- programs they receive before making them available for downloading. The
- chances are, then, that the program will immediately start running as soon
- as you enter TIMEGEN in DOS and press return. If the program has
- been previously configured, there is a good chance that the configuration
- will not be right for you. The time zone might not be yours, or the time
- season might have changed, or you are using a different serial port, or you
- have a monochrome system and the program has been preconfigured for
- color (or vice versa). For this reason, you should run TIMEGEN in
- configuration mode the first time you use it.
-
- To configure, you have to be in the same drive and directory as the
- program itself; you can't do it from any other drive and directory. Once
- you're in TIMEGEN's drive and directory, type the following at the DOS
- prompt:
-
- timegen /c
-
- The /C tells the program you want to configure. The four questions you
- have to answer are easy ones, and explanation is provided on the
- configuration screen itself for one of the questions. The first question is
- the only one that requires some thought (and very little at that). It has
- to do with your time zone. What is required here is a number
- representing the hours difference between your local time and the time in
- Greenwich, England (0 degrees longitude) when both places are under
- STANDARD time. Examples are provided for all four time zones in the
- contiguous United States. Don't try to make any adjustment here if you
- are on daylight time; the very next question will ask if you're on daylight
- time, and the program itself will make the necessary adjustment if your
- answer is yes. Another point: for time zones west of Greenwich it is
- absolutely essential that the number you enter be preceded by a minus
- sign.
-
- A final point on the time zone setting: if the host computer's clock is set
- to universal time (which can be done automatically by calling the Naval
- Observatory with TIMESET configured for universal time), the offset to
- enter in response to the time zone prompt is 0. Some organizations,
- notably airlines, are run on universal time, and it's likely that many of
- their computers are set to it. If the host computer is on universal time,
- you must not choose daylight time at the next prompt because there are
- no seasons to universal time; there is no such thing as "universal daylight
- time." Unlike civil time, universal time does not "spring forward" and "fall
- back" with the change of seasons, it's always standard time.
-
- The only question about your modem pertains to the port to which it
- is attached. Other modem settings, including baud rate (1200), parity, data
- bits, and stop bits, are built into the program and are not configurable.
- You have a choice of COM1, COM2, COM3, or COM4 and you make it
- by typing 1, 2, 3, or 4. There are factors that limit the choice of COM3
- or COM4, however. COM1 and COM3 can't be used at the same time,
- and COM2 and COM4 can't be used at the same time. Thus, if you have
- a serial mouse attached to COM1, you may configure TIMEGEN to use
- a modem attached to either COM2 or COM4, but you can't have a modem
- (or any other device) on COM3. And if you have a mouse on COM2, you
- may configure TIMEGEN to use a modem attached to either COM1 or
- COM3, but not to COM4. The technical reason for this is that a PC does
- not have enough IRQ (interrupt request) lines to support four COM ports
- simultaneously and independently. COM1 and COM3 have to share one
- line and COM2 and COM4 have to share another, and you can't have two
- devices using the same IRQ line. This is a limitation of the PC, not of
- TIMEGEN. If the program detects the presence of a serial port mouse
- in a multiple port system during configuration, it will indicate which
- COM ports may not be used for the modem.
-
- The last question is about your monitor. You can have either a color
- or monochrome display if you have a color system. If you have a
- monochrome video adapter, you will get a monochrome display no matter
- what you choose here.
-
- A final prompt asks whether your configuration is OK. If you respond
- by typing "y" the configuration is written into a special buffer in the
- program's own disk file and the newly configured program is automatically
- reloaded. If you type "n," the configuration procedure starts over.
-
- It's extremely simple to reconfigure this program. Most likely you will
- have to do it only twice a year to adjust for changes between standard and
- daylight time.
-
- Once TIMEGEN is configured you can run it from any directory,
- provided you have created a path to it by means of the DOS PATH
- command. You will also need a path to Professional TIMESET since
- TIMEGEN needs to run that program through a shell.
- ROUTINE OPERATION
-
-
- TIMEGEN cannot function properly without TIMESET. You will need
- both programs. Furthermore, TIMESET must be version 5 or higher
- (Professional TIMESET). Likewise, callers will not be able to access
- TIMEGEN with versions of TIMESET earlier than 5. The reason is that
- the earlier versions have the Naval Observatory's phone number built into
- their code, whereas Professional TIMESET allows the user to enter any
- phone number (except mine). Professional TIMESET (ver. 5 or later) is
- available for downloading as shareware from Compuserve and many
- computer bulletin boards. It can also be obtained directly from Life
- Sciences Editorial Services, 1236 River Bay Road, Annapolis, Maryland
- 21401 (single user charge: individuals $35, institutions $75; special licensing
- is required for institutions making multiple copies for use on more than
- one computer).
-
- This section describes several ways of operating TIMEGEN. Since the
- purpose of the program is to provide an accurate time standard for other
- computers, it is obvious that no matter what operating mode is selected,
- the source computer's clock needs to be as accurate as possible.
- TIMEGEN makes this easy by automatically running Professional
- TIMESET to call the Naval Observatory before starting to generate its
- own time signals. Furthermore, if TIMEGEN is loaded for continous
- long-term operation, the computer clock will be kept highly accurate by
- periodic calls to the Naval Observatory (calling interval is determined by
- the user). These clock updates in the source computer are accomplished
- by an automatic shell to TIMESET. The total amount of memory
- required for TIMEGEN and the shell to TIMESET is less than 145 kbytes
- (TIMEGEN requires about 51 kbytes and Professional TIMESET requires
- about 89 kbytes).
-
- After the initial call to the Naval Observatory is completed and the
- computer's clock is updated, TIMEGEN opens the designated serial port
- in answer mode, waits for incoming calls from computers calling with
- Professional TIMESET, and continuously displays Naval Observatory-style
- time data strings as it waits.
-
- As soon as connection is established, TIMEGEN will start sending the
- time data strings over the line to the calling computer. The strings will
- have exactly the same form as the Naval Observatory's data strings:
-
- <cr><lf>jjjjj ddd hhmmss UTC<cr><lf>*
-
- where <cr> stands for carriage return; <lf> stands for line feed; jjjjj is
- the truncated number of the Julian day at Greenwich, England (the true
- Julian day would have the same number preceded by 24); ddd is the day
- of the year at Greenwich; and hhmmss stands for hours, minutes, and
- seconds at Greenwich. The letters UTC stand for coordinated universal
- time. The asterisk marks the instant when the time changes to the
- universal time just announced in the same data string.
-
- A universal time data string of this form is synthesized by TIMEGEN
- every second and part of it (jjjjj ddd hhmmss) is displayed on the screen
- in large numbers that change every second, whether or not a caller is on
- line. To synthesize these strings, TIMEGEN makes use of the computer's
- clock and the time zone and time season information you supplied at
- configuration. Each string displayed is what will be sent next, and
- therefore will be 1 second ahead of local seconds (local time is also
- displayed continously, in smaller numbers). If a call is in progress, all the
- string characters except the asterisk are sent through the modem as soon
- as they are synthesized. Then there is a slight pause as the program waits
- for the second to change. The asterisk is sent at the instant the second
- changes, and the word "Sent" flashes simultaneously at the right side of the
- screen. The calling TIMESET program reacts to the arrival of the asterisk
- by immediately setting the calling computer's clock to the time just
- announced by TIMEGEN, after making adjustments for local time zone
- and time season.
-
- The whole process is precisely orchestrated, but the results can be no
- more accurate than the accuracy of the host computer's clock. As noted,
- high accuracy in the source computer's clock is ensured by automatic shells
- to TIMESET while TIMEGEN is running.
-
- The interval for these automatic clock updates is set by the user at the
- time of loading, and the choice depends on the stability of the computer's
- clock, the amount of time drift that can be tolerated, and how long
- TIMEGEN will be run. If your computer gains 0.1 second per hour, as
- mine does, and accuracy within half a second is acceptable to you, you
- won't have to redial the Naval Observatory for 5 hours. You wouldn't
- even have to do that if you wanted TIMEGEN to run for 5 hours or less.
-
-
- Indefinite Period of Operation
-
- The simplest way to run TIMEGEN is by typing its name in DOS and
- pressing return. When loaded this way, the program will synchronize with
- the Naval Observatory then wait for timesetting calls until the ESC key is
- pressed to make it stop. The time will probably have adequate accuracy
- if the run period is not too prolonged (you'll need to experiment to find
- out what is "too long" for your own computer clock). If TIMEGEN is to
- be run for several hours, however, this is not the best way to do it. A
- method to be described a little later is far better because it provides
- automatic updating of the host computer's clock by periodic calls to the
- Naval Observatory.
-
-
- Automatic Operation Between Designated Times
-
- Two command line switches, STARThh:mm:ss and STOPhh:mm:ss, are
- available for defining a specific period of operation during which
- TIMEGEN will respond to incoming calls. For example, if you wanted to
- set up TIMEGEN to respond to calls between midnight and 8 am, you
- could enter the following at the DOS prompt:
-
- timegen start00:00:00 stop08:00:00
-
- Notice that there must be no space between START and its numbers and
- between STOP and its numbers. They must be run together as shown.
- Notice also that times must always be entered in DOS's 24-hour format,
- where 1 p.m. is 13 hours, 11 p.m. is 23 hours, and midnight is 0 hours.
-
- Actually, it can be even simpler than that, because you don't have to
- enter values for minutes and seconds in this situation where you start and
- stop on the hour. Thus the following would also work:
-
- timegen start0 stop8
-
- Nor do you have to use seconds in the start and stop times if don't want
- to. A command like this will also work:
-
- timegen start0:30 stop08:30
-
- The program will load immediately, but it will wait until the designated
- starting time (local time) before dialing the Naval Observatory for an
- initial timeset. Then it will open the serial port, put the modem into
- answer mode, and continuously display the local time as it waits for calls.
- At the stop time it will restore the modem to its default settings, close the
- port, and exit to DOS.
-
- What if someone is on line when it's time to shut down? Do they get
- cut off? No, the stop time is automatically incremented second by second
- until the call is completed, then the shut-down occurs.
-
-
- Operation for a Specific Period of Time
-
- An alternative method of timed operation is simply to specify how long
- the program should run. This is done by using the word PERIOD on the
- command line. Thus, if you wanted the program to run for a period of
- two and one-half hours then quit, you would type the following in DOS
- (with no spaces inside the command line switch):
-
- timegen period2.5
-
- The number of hours can range from 0 to 24. The fractions of hours
- can only be .25, .50, or .75, that is, 15-minute blocks. Any other fractions
- will be ignored.
-
- The START switch can be used in combination with PERIOD to make
- the program wait until a starting time before opening the port. Here is
- a command that would load the program, make it wait until 8:15 p.m. to
- start, stay available for sending time signals for 4.25 hours, then shut down
- (at a half hour past midnight):
-
- timegen start20:15 period4.25
-
- Don't bother putting in the STOP switch if the PERIOD switch is
- present. The STOP switch is ignored in that situation.
-
- Full-Time Operation with Periodic Naval Observatory Updates
-
- If you are willing or need to dedicate a computer to prolonged full-time
- generation of Naval Observatory time signals of the highest accuracy, you
- can do that too with TIMEGEN working in combination with Professional
- TIMESET. The minimal command line switches needed for full-time
- operation are CONTINUOUS and PERIODnn.nn
-
- Thus the following command would cause continuous operation with
- automatic update calls to the Naval Observatory every 4 hours:
-
- timegen continuous period4
-
- The cycle will go on endlessly until you press the ESC key while in
- TIMEGEN. Additional variations are possible. For example, the START
- switch can be used together with CONTINUOUS and PERIODnn.nn to
- make TIMEGEN wait until a certain time before starting continuous
- operation with periodic clock updates from the Naval Observatory. It is
- also possible to enter options on TIMEGEN's command line that will
- control the operation of Professional TIMESET during the periodic
- updates. For example, Professional TIMESET can do remote digital
- loopback (RDL) tests to measure and correct for signal delays (most useful
- for satellite links). However, both modems must be capable of doing the
- test. Furthermore, the modem that TIMEGEN is using must be
- configured to grant the RDL request from the calling modem. This is
- best done by using a standard communication program to write the
- configuration into the modem's nonvolatile memory; the command is
- AT&T4&W. (Hayes 2400 Smartmodems are configured at the factory to
- grant an RDL request from a remote computer, but other brands may
- not be.)
-
- A full discussion of Professional TIMESET's command line switches is
- beyond the scope of this document -- you'll need to get Professional
- TIMESET anyway -- but all of them can be passed to Professional
- TIMESET by putting them on TIMEGEN's command line preceded by the
- word TIMESET. For example, if you wanted TIMEGEN to run
- continuously, with a shell to TIMESET every 5 hours for automatic Naval
- Observatory update, and with correction for signal delay, you would type
- the following:
-
- timegen continuous period5 timeset/l
-
- /L is the command line switch that tells Professional TIMESET to do a
- remote digital loopback test and calculate signal delay. Please note that
- the word TIMESET is simply a flag to announce command line switches
- that are to be passed to TIMESET when TIMEGEN runs it. If you don't
- want to pass any switches to TIMESET, you don't need to put the word
- TIMESET on the command line (TIMESET will be run anyway, in bare
- bones automatic fashion).
-
- The periodic calling of the Naval Observatory in the continuous mode
- of operation ensures that time signals sent to other computers by
- TIMEGEN will always be very close to the true time. In fact, with
- sufficiently frequent update calls to the Naval Observatory, TIMEGEN's
- signals can be made practically as accurate as those obtained from the
- Naval Observatory itself. For example, since my computer's clock gains
- about 0.1 sec per hour, I could maintain 1-second accuracy by calling the
- Naval Observatory with TIMESET every 10 hours, 0.5-second accuracy by
- calling it every 5 hours, 0.1-second accuracy by calling it hourly, and 0.05-
- second accuracy by calling it every 30 minutes.
-
-
- A NOTE ON ACCURACY
-
- Clearly, the greater the accuracy desired the more frequently the Naval
- Observatory has to be called. You'll need to decide what level of
- inaccuracy is acceptable and adjust TIMEGEN's frequency of calls to the
- Naval Observatory to achieve that level. Striving for extreme accuracy can
- require a lot of long-distance calls, depending on the stability of the host
- computer's clock. On the other hand, you may need to consider how
- many more long distance calls would have to be made if, say, 25 computers
- in an organization that could be served locally by TIMEGEN were instead
- to call the Naval Observatory several times a day to maintain the same
- degree of accuracy.
-
- Here is a suggestion for fearless souls who know their way around the
- inside of a computer (others should not try it!). It is possible, on some
- computers anyway, to fine tune a computer's clock by adjusting a set screw
- near the clock chip, which is usually located on the bottom side of the
- mother board. With computers that have this feature, a daily small (very
- small!) incremental adjustment followed by delayed observation of effects
- on clock accuracy (checked with Professional TIMESET, of course, since
- it can create a log file to save your before-after system clock readings for
- analysis) should eventually lead to a significant improvement in the
- computer clock's accuracy and a corresponding reduction in the required
- frequency of update calls to the Naval Observatory. It would seem
- advisable to make a micro adjustment and wait a full day before checking
- the results, then make another micro adjustment if necessary and wait
- another full day to measure the change, and continue this way until you
- are satisfied that the clock can't be made any more accurate. (It's certain
- that it will never be perfect, because the clock speed can be affected by
- temperature variations. That's why places like the Naval Observatory and
- the National Bureau of Standards use hugely expensive atomic clocks.)
-
- Going to these lengths to achieve extreme accuracy for TIMEGEN is
- probably not necessary for most situations. Most organizations will
- probably be quite satisfied to have their TIMEGEN-equipped host
- computer and all their other computers within one second of true time.
- With a reasonably well behaved computer clock, TIMEGEN can achieve
- that with maybe a couple of well spaced calls to the Naval Observatory
- each day.
-
-
-
- SHAREWARE REGISTRATION
-
- If you like TIMEGEN and continue to use it after a reasonable trial
- period (14 days), you should pay for it. The price is $25 for a single copy
- for a single machine (with only backup copying). Special licensing is
- required for institutional users who make copies for use on more than one
- computer (contact the author at the address shown below).
-
- Your registration will contribute to the program's further development,
- and it entitles you to one free upgrade on diskette when available and
- advice by telephone (your call) if you run into problems. The address for
- registration and for licensing inquiries is:
-
- Peter L. Petrakis
- Life Sciences Editorial Services
- 1236 River Bay Road
- Annapolis, Maryland 21401
-
- Please make your check or money order payable to Peter L. Petrakis and
- include your name, address, zip code, and phone number. Thanks.
-
-
- TIME GENERATOR REGISTRATION FORM
-
- (Institutions using multiple copies of TIMEGEN on multiple computers
- should not use this form; instead contact Life Sciences Editorial Services
- for site licensing arrangements.)
-
-
- To:
- Peter L. Petrakis
- Life Sciences Editorial Services
- 1236 River Bay Road
- Annapolis, Maryland 21401
-
-
- I enclose payment for registration as a user of TIMEGEN.EXE.
-
-
-
-
- YOUR NAME:
- ________________________________________________________
-
- YOUR
- ORGANIZATION:_________________________________________________
-
- YOUR ADDRESS:
- _____________________________________________________
-
- _____________________________________________________
-
- CITY, STATE, ZIP ____________________________________________
-
- YOUR PHONE: (____) ____ ______
-
-
-
- METHOD OF PAYMENT (Check one)
-
- Check ___
- Money Order ___
-
- AMOUNT ENCLOSED (the $25 price entitles you to make copies of
- TIMEGEN for backup purposes for use on a single machine only)
-
- $25 ___
-
-
- YOUR SIGNATURE: ________________________________________
- DATE: ____________
-
- RESTRICTIONS AND DISCLAIMER
-
- TIMEGEN.EXE and this document are copyrighted, with all rights
- retained by their author, Peter L. Petrakis, Life Sciences Editorial Services,
- 1236 River Bay Road, Annapolis, Maryland 21401. The program may be
- freely distributed provided (1) this document always accompanies it and (2)
- neither the program nor this document is altered in any way.
- TIMEGEN.EXE and its documentation are NOT donated to the public
- domain, and no one besides their author is allowed to sell, solicit payment
- for, or modify them. Distributors of shareware, freeware, and public
- domain programs who charge only a modest disk copy fee to cover
- distribution expenses are permitted to distribute these files. Violation of
- these terms is an infringement of copyright under the laws of the United
- States and associated international treaties.
-
- Although TIMEGEN.EXE has been extensively tested, Peter L. Petrakis
- makes no warranty concerning the program's fitness or safety, and he
- accepts no responsibility or liability for any kind of mishap resulting from
- its use.
-
- Your use or distribution of the program implies your acceptance of all
- these terms.