home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
r
/
ritm25.zip
/
RIGHTIME.TXT
< prev
next >
Wrap
Text File
|
1993-03-01
|
60KB
|
1,171 lines
RighTime v2.53 Copyright 1991-93, GTBecker
March 1, 1993 All Rights Reserved
Shareware Notice
The following files are contained in the evaluation distribution file:
RIGHTIME.COM TESTINCR.COM
RIGHTIME.TXT (this file) TESTTIME.COM
RIGHTLOG.COM VIEWCMOS.COM
SETUPRT2.COM
If any of these files are missing, you do not have a complete
evaluation package. A fresh distribution file of the latest version of
RighTime and its associated programs is always available on the Air System
Technologies BBS, 214/869-2780 (1200-14400 8N1).
These files are the copyrighted property of G.T. Becker and Air System
Technologies, Inc., of Dallas, Texas, USA.
You may use these evaluation programs for up to one month, and you may
- and are encouraged to - pass the unmodified evaluation distribution file
along to others, but no one may modify, rename or sell the files or programs
to anyone under any circumstances. Although they will continue to function,
the programs will notify you when the evaluation period has elapsed.
If you choose to continue to use RighTime you must register your use.
Registered RighTime users receive a diskette containing the current version
of the registered programs and additional utilities, a printed user manual
and license agreement, automatic notification of new releases, and
enthusiastic support from the author whenever needed. The registered version
of RighTime is functionally identical to the shareware distributed evaluation
version, except that it lacks registration reminders, it is smaller in size,
it can operate in a non-verbose and silent mode, and it is serial-numbered to
the individual or business registrant.
To register, fill in the form at the end of this document and send it
with US $40 for each machine that is to run RighTime to Air System
Technologies, Inc., 14232 Marsh Lane, Suite 339, Dallas, Texas 75234, USA.
What is RighTime Version 2?
RighTime is a resident real time clock correcting program for MS-DOS,
PC-DOS and DRDOS running on PC/AT-class machines. It corrects both DOS and
CMOS RTC clock rate error as large as 5.5 minutes per day, and it increases
the DOS clock resolution from about 0.055 second to 0.01 second. It occupies
only about 6.5K of system RAM and can normally be loaded high. If RighTime
is installed as suggested, the system clock will behave as properly and
accurately as the system clock of a computer should.
RighTime brings exceptional system time-of-day clock performance to the
machine with no additional hardware. With RighTime installed, the standard
real time clock system becomes an Adaptive Mathematically Compensated
Crystal-controlled Oscillator based clock. Under stable conditions, RighTime
can produce a system clock that keeps time within 0.5 second per week or
better (some users have reported consistent rate accuracy of 0.07 second per
week). An error rate 0.5 second per week is about 0.8 part per million, or
more than 100 times better than an unconditioned crystal time base alone, or
about 30 times better than a moderately conditioned one like a modern watch
of quality.
RighTime Version 2 exhibits many new features, but retains version 1.1
compatibility (except /H). In addition to numerous invisible internal
improvements, RighTime Version 2 sports the following changes:
* True 0.01 second DOS clock resolution: the 55-millisecond barrier
is broken! The DOS clock increments in 0.01 second steps while
maintaining the standard "tick" rate. [See /TH below.]
* File mode correction storage can be directed to either
RighTime.COM or to a separate data file (RighTime.COR), which
will prevent anti-virus watchdog utilities from flagging
RighTime. [/FR, /FM]
* Correction storage can be directed to any valid CMOS RAM address
that is available in the machine, including extended RTC CMOS and
MCA-type (PS/2 and -SL) CMOS RAM. [/R, /RM]
* Four levels of function disabling. [/TH, /TD, /TA, /K]
* Disabled cool correction and improved warm correction
application. [/D, /U, /X]
* Options are provided that allow learning disabling and ignoring
time and date sets. [/L, /I]
* Automatic Daylight/Standard time change in the USA. [/A]
* Fixed offset values may now range from -90.00 to +90.00 seconds.
[/O]
* Logging of all time-related activity. [/G]
* Highlighting of significant data and ANSI color screens. [/Y]
* On screen memory-jogging help. [/?]
* Silent and defeatable self test. [/Q]
* Non-verbose mode (registered version only). [/V]
* /W, /C and /O values may be expressed as either integers
(hundredthseconds) or as fractional seconds (i.e. /W-1234 =
/W-12.34), consistent with a new displayed data format.
* RighTime's status report includes duration since last time set,
duration since last applied CMOS adjustment and percentage of
warm system operation (any /F and extended CMOS /R only).
* Intelligent application of warm and cool corrections, weighted
observed error and distributed modification of correction values
(both warm and cool corrections will be modified based on
observed error at timeset and percentage of warm system
operation) (any /F and extended CMOS /R only). Although the
practice remains the ideal, it is no longer necessary to set the
clock immediately after booting and just prior to shutting the
system down to learn the cool and warm corrections; you may set
the time at any time, and RighTime will do its best to adjust the
corrections appropriately.
* Tools are provided to visualize and verify RighTime's actions.
[TestTime, TestIncr, RighTLog, ViewCMOS]
+ An improved TestTime is able to resolve clock error to four
decimal places (to tenths of milliseconds), reports the
DOS-CMOS offset immediately, and displays the DOS time to
hundredths.
+ TestIncr measures and displays the DOS clock resolution.
+ RighTLog displays the record of all time-related activity
on the system. It identifies the source of each timeset
and dateset by program name, making hidden timeset
troubleshooting easy.
+ ViewCMOS can now display the first 128 bytes of MCA-type
CMOS on those machines equipped with it.
* SETUPRT2, a full-screen install program, eases first-time
installation and startup as well as reinstallation when changing
options.
* Professional TimeSet v7.10 or later by Pete Petrakis (Life
Sciences Software, Stanwood, Washington USA) can directly control
several RighTime functions and provides a RighTime status screen.
These two programs were developed in concert and work
exceptionally well together. TimeSet uses a modem to call any of
five atomic clock time standards (in the USA, Austria, Italy and
Sweden) to set the system clock to millisecond accuracy. It is
highly recommended. Its shareware evaluation file is available
on the Air System Technologies BBS.
What Does RighTime Do?
First, here is what RighTime cannot do:
- RighTime cannot correct clock boards or computer motherboard
clocks that do not emulate the PC/AT hardware clock and its BIOS
support precisely. The large majority of current 80286-, 80386-
and 80486-based machines (termed PC/AT-class) are compatible.
- RighTime cannot properly correct an unstable clock; most clocks
are slow or fast and they are essentially unvarying. If your
clock wanders aimlessly or has suddenly changed behavior, your
hardware might need repair (perhaps simple battery or CMOS RTC
module replacement).
RighTime exploits the better qualities of each of the two clocks in the
system and improves upon them by doing four fundamental things:
1) RighTime slaves the DOS system clock (which has higher
resolution) to the hardware clock (which has higher stability).
2) RighTime augments the DOS clock driver routines with its own
routines, which provide resolution in excess of 0.01 second.
3) RighTime monitors time set commands (and the equivalent system
calls from any program) to learn the hardware clock error rate.
4) RighTime improves and maintains accuracy by regularly calculating
and applying corrections or adjustments to each clock.
RighTime intrinsically sets the hardware clock and solves the midnight
rollover date error that exists in most DOS/BIOS combinations,
eliminating the need for other utility programs or drivers that perform
these functions. Unlike DOS alone, the hardware clock seconds
transition will be properly set by RighTime and the time will be set to
0.01 second resolution, and these qualities will survive through
rebooting. If the machine is powered off, the clocks will be
appropriately adjusted for the off period at the next boot, and a
separate correction is learned and maintained for that period.
Each time you set the time, RighTime will improve the accuracy of the
corrections, which will subsequently improve the accuracy of the
clocks. It should be easy to achieve a worst-case error of less than
0.5 second per day (usually quickly improving to less than 0.5 second
per week). Numerous options are provided that allow fine tuning the
correction process to your system and application.
An option [/S] is provided which assists in automatic timesetting by
directing RighTime to notify a batch file when a specified number of
days has elapsed since the last timeset or if the program's correction
capabilities have been exceeded. This feature is available both at
boot and when RighTime is resident.
Large time changes will not affect the corrections. This permits
seasonal time changes; these bi-annual changes can also be automated in
the USA.
RighTime usually runs fine with Microsoft Windows (although Windows
itself always lags DOS by a few seconds) and with multitaskers and
DOS-based LANs.
Knowledge Saves Time - Contraindications
Just as with medicine that cures ills, RighTime needs to involve itself
in several areas of the operating system to do its work, and there can be
side-effects. Side-effects of RighTime are usually minor and correctable.
Be aware of the following so you'll know what you can do if you need to.
* Some programs (usually games) reprogram the 8254 timer-counter to
improve the video screen update rate or to produce sounds. Since
the 8254 is part of the DOS clock mechanism, RighTime will
normally immediately correct the mode change - and slow the game.
This protection can be relaxed without compromising the clock by
selectively disabling RighTime [usually /TD] for the duration of
the game and reenabling it afterward.
* High-speed (9600 and higher) communication sessions can sometimes
be disturbed by RighTime. An option [/M] yields automatic
disabling during communication activity on selected ports.
* Programs that bypass the operating system and control the
hardware directly can cause odd symptoms. Tape backup utilities
seem to be the most common offenders, potentially causing DMA
errors with RighTime's /F options. Most of these programs offer
an option that uses the DOS and BIOS function calls instead; use
it, or disable RighTime [/TA] for the duration of the backup.
* Disk defragmenters (PCCOMPRESS, SPEEDDISK, DOG, etc.) can produce
cross-linked files resulting in loss of data if RighTime is
active (with any /F option). DOS is not aware that these
utilities are moving files around, so RighTime isn't either.
RighTime (with any /F option) must not be running [/K] when
defragmenting the disk drive on which it resides.
* Some screen savers and program schedulers misfire prematurely and
some on-screen clocks run fast due to RighTime's high resolution
DOS clock mode. Some programs also have difficulty when run from
within a DOS window. Disabling the 0.01 second DOS clock mode
[/TH] usually allows these programs to coexist with RighTime.
* No resident program that uses files (like a screen capture
utility or a scheduler) should be loaded before RighTime (with
any /F option). The ideal location in the AUTOEXEC.BAT for
RighTime is first. If you want to load RighTime in high memory,
be aware that the program uses several anti-virus and anti-
hacking techniques to protect itself. This requires a large
(about 80K), but brief, use of memory.
In most cases, a program conflict can be resolved by temporarily
disabling RighTime. This can be accomplished manually at the DOS
prompt, with a batch file, or via a multiple-command line in 4DOS or
NDOS. RighTime functions can be quickly reenabled afterward.
Standard Installation
RighTime is now provided with a simple installation process that will
assure successful startup. We strongly suggest that you follow this
procedure. After you have some experience with the program you can
manipulate options at the command line level if you wish, but even for these
changes the supplied installer program, SETUPRT2, is recommended.
1) If you are currently running RighTime, kill it (RighTime /K).
2) Make a new directory and get in it, for example:
MD \TEMP
CD \TEMP
3) Copy the shareware distribution file into the new directory and
unzip it. Verify that all of the files listed above are present.
4) Run from a DOS prompt:
SETUPRT2
5) SETUPRT2 will allow you to select many options, but you can
initially accept the defaults by simply selecting "Install"; you
can change them anytime later.
6) When asked to do so, set the time accurately (preferably with
TimeSet). Then type "EXIT". Your AUTOEXEC.BAT and, if required,
CONFIG.SYS files will have a line added to them.
7) You will normally be directed to reboot by pressing Ctrl-Alt-Del.
8) Set the time accurately for a few days, ideally immediately
before you shutdown your system for the night and immediately
after booting in the morning. If you never shutdown your system,
set the time accurately a few times each day, well spaced.
You should find that your system clocks rapidly become more accurate.
If they do not, check RighTLog for invisible, unexpected time sets (which
will confuse RighTime's learning). The name of the program that set the time
is identified in the log. You might be surprised to find that some programs
- that have no apparent business doing so - set the clock, usually
incorrectly and always disturbing RighTime. You will need to consider an
option [/I] that can deal with these rogue programs; read on.
You will normally not need to proceed beyond this point, but if you
have trouble with the standard installation, the following sections discuss
RighTime in greater detail.
Starting RighTime
Part of the RighTime process requires storage of some correction data.
The amount of data is small and it must be stored in a place that will
survive rebooting and power failures. To use RighTime, first decide where to
store the corrections. There are two options: disk file and unused CMOS RAM.
In general, try the disk file option first if you can. If you have a hard
disk, you can use the disk file or possibly the CMOS RAM option. If you have
only floppies the disk file option is impractical, so consider the CMOS RAM
option. A diskless machine cannot use the disk option, unless it is equipped
with a non-volatile RAM disk which appears to the system as any other disk
would.
The CMOS RAM option will involve some initial bravado: although only
the first 52 bytes of a 64-byte CMOS RAM are defined by the original IBM PC
standard (presumably leaving the last 12 bytes available), most modern BIOSs
use these 12 bytes for other functions. If you have adopted a user-specified
hard disk format, for example, your specification might be stored there.
Sometimes the area is used for the power-on password in machines so equipped.
Many modern machines contain 128-byte CMOS RAM areas, and others (some PS/2
models and SL-based machines) contain 256 bytes of CMOS RAM. SETUPRT2 will
only allow selection of CMOS RAM addresses that allow for the proper storage
of RighTime's correction data, but there is no guarantee that the address you
select is unused in your machine configuration. You can run ViewCMOS to look
at the CMOS RAM contents, but again, there is no guarantee that even a large
block of zeros is free and safe to use. Before attempting to use the CMOS
RAM option, be forewarned that CMOS RAM contains system setup data that
RighTime might inadvertently disturb; be prepared to reset the setup data if
the CMOS RAM option is unsuccessful on your system. If this dissuades you or
if you are otherwise reluctant, use the disk file option if you can.
If you choose the disk file option, RighTime will attempt to write to
a disk file (its own program file or a separate data file) from time to time,
so write access must be allowed. If the "disk" is actually a non-volatile
RAM disk card, the card must remain in the machine if this option is to work
properly. If you use the disk file option on a battery powered hard disk
laptop, you might want to decrease the update frequency to allow your hard
disk to spin down after periods of inactivity to increase the battery life
(see the /U option, Command Line Syntax, below). The disk file option causes
RighTime to maintain an open handle to a file which will present a problem
when running a file-defragmenting utility on the same disk drive that
RighTime is updating, but RighTime can be killed during defragmentation and
restarted afterwards (see the /K option, Killing, Disabling and Reenabling
Resident RighTime, below).
RighTime can also be configured with no correction storage, with
consequential loss of some of its utility (see No Correction Storage Option,
below).
If you know how fast or slow your clock appears to run per day, you can
optionally speed the learning process of RighTime by suggesting a correction
to the program as a signed number in hundredths of seconds - positive for a
slow clock, negative for a fast clock. For example, if your clock runs about
two minutes fast per day, the suggested correction should be -120.00 (120
seconds). There are actually two corrections that RighTime normally applies,
one while the system is running and warm, and another when the system is
turned off and cool. If you know the cool correction, you can suggest it
also. If you don't know one or either correction, RighTime will determine
them anyway; it'll just take a little longer for the corrections to mature to
good accuracy.
If you need to restart RighTime and it is currently resident and
running, you must first kill the resident program (see Disabling and
Reenabling Resident RighTime, below). If appropriate, the corrections that
RighTime has already learned can be suggested to the new program copy.
If you have been using another resident driver or TSR to correct the
weaknesses of your clock, remove all references to it from your CONFIG.SYS
and AUTOEXEC.BAT files and, once you are confident that RighTime is all it
purports to be, remove the other driver or TSR from your system.
Setting the Time
If you have access to a time standard, use it. For best accuracy, use
a telephone service time-setting program such as TimeSet. Alternatively, you
can listen to WWV, CHU or another shortwave time signal, or a radio network
news broadcast, and be prepared to set your clock when you hear the beep on
the minute or hour. Don't use a radio station that is airing a call-in talk
show; the audio is usually delayed six to ten seconds on such programs to
allow for profanity dumping, and so the beep will be equally late. An all-
news format station is probably not delayed. To be certain, call the radio
station and ask for engineering; they will know. Local telephone time
services are usually poor; don't trust that they are correct. What is
important is accuracy.
Do not set the time from within Microsoft Windows. If you do, the
resulting time set will be late. This probably also applies to DESQView and
other multitaskers. Always set the time (or run the time setting program)
from a pure DOS prompt.
RighTime will monitor each time set occurrence, learning from your
adjustments. Whenever you notice or suspect that the indicated DOS system
time is insufficiently correct to satisfy you, reset it accurately. You will
find that the clocks will become more and more accurate and the need for
adjustment will decrease, becoming infrequent; however, you must set the time
accurately at least once per month (an option is provided to assist in
automating this [/S] (see Errorlevels, below).
Allow sufficient time to elapse between time sets so that enough error
exists for RighTime to use in its correction calculations; the more time that
you allow, the better the correction factors that are determined. Careless
timesets will result in poor correction or even wild clock behavior; remember
that you are "training" the program, so do it well. If you are eager, four
hours will probably be an adequate initial wait; of course, you can use your
system as you normally would during this time. Each time the time is set,
RighTime will make appropriate adjustments to the cool and warm correction
values.
The Results
After a few days of your diligent time setting, the corrections should
settle to fairly constant numbers which will be true indications of the
uncorrected performance of your hardware clock. Once RighTime is installed,
you can display the current corrections by simply running RighTime again at
a DOS prompt (no parameters are required). The correction values and other
current status will be displayed and a functional self test will normally be
performed, verifying that RighTime is currently running properly on your
system.
When running RighTime, whether at installation or when resident, the
program will normally be silent. If RighTime beeps, pay close attention to
its report; it is warning you of an unusual condition or failure. If data
highlighting is not disabled [/Y0], unusual conditions or failures will be
highlighted.
As long as RighTime is in use and you've been diligent in your
adjustments, and the corrections have matured, the CMOS RTC error will not be
more than 0.5 second, and the DOS clock will be much more accurate than that.
RighTime has limits of one week of inactivity, and one month between
time sets, that can be corrected to a maximum of 5 minutes, 27.67 seconds per
occasion; beyond that, all bets are off. In that case, unpredictable, and
probably incorrect, clock changes can occur, but RighTime will advise you of
its difficulty if it can. For example, if your clock runs two minutes slow
per day and you don't use the system for three full days, when you boot up
you will receive a message warning that the clock needs to be adjusted
manually (or automatically; see Errorlevels, below). The subsequent
adjustment will not affect the corrections.
No Correction Storage Option
If you have difficulty with both the CMOS RAM and disk file options or
you need or wish to use neither option, RighTime can still correct the clocks
for as long as the system runs continuously. What RighTime has learned will
be lost when you reboot or power down, and there can be no cool correction.
Otherwise, all of the comments above apply. If you suggest a good warm
correction and you set the clock after you boot, RighTime will serve well.
Killing, Disabling and Reenabling Resident RighTime
There will normally be few, if any, occasions that will require you to
disable RighTime, but some instances exist that can only be resolved by
temporarily removing RighTime from contention. There are four levels of
disabling; each level is more restrictive in what RighTime is permitted to
do. From least restriction to most, the disabling options are /TH, /TD, /TA,
and /K.
Once RighTime is resident, it can be disabled by running at a DOS
prompt:
drv:\path\RighTime /TH [disables 0.01 second DOS clock]
or
drv:\path\RighTime /TD [disables DOS clock maintenance]
or
drv:\path\RighTime /TA [disables all functions (including
logging)]
Resident RighTime can then be reenabled by running:
drv:\path\RighTime /E [enables all functions]
Programs that defragment or reorganize the hard disk must always be run
with no open files. When using RighTime's disk file option [any /F],
an open handle is maintained to a file, so BEFORE RUNNING A DISK
REORGANIZING UTILITY, RighTime MUST BE KILLED. After the utility
completes, RighTime can be restarted with the same command line used in
the AUTOEXEC.BAT file. However, most defragmenting utilities suggest
rebooting afterward; in that case, AUTOEXEC.BAT will restart RighTime.
This precaution is not required when using the CMOS RAM option.
RighTime can be irreversibly disabled (or "killed") by running:
drv:\path\RighTime /K [entire resident program terminated]
The /K switch will cause the function of RighTime to terminate, but the
memory that was allocated to RighTime will remain allocated and
unavailable. If you wish, another copy of RighTime can be started with
different options; in that case, a memory map will indicate multiple
RighTime allocations, but only one will be active.
If it is your intent to permanently remove RighTime from your system,
you can do so by killing the resident program and removing or REMing
the RighTime invocation in your AUTOEXEC.BAT. Rebooting is not
immediately necessary.
RighTime provides another method to temporarily disable its function in
instances where the program interferes with serial modem communication.
An option will continually test for the presence of Data Carrier Detect
(DCD) from each specified serial port. When DCD is active, RighTime
will be disabled, equivalent to /TA. Normal function will resume when
DCD becomes inactive. Multiple ports can be specified.
To activate DCD monitoring, use the /M switch as follows:
drv:\path\RighTime /M1 [for COM1]
or
drv:\path\RighTime /M2 [for COM2]
or
drv:\path\RighTime /M3 [for COM3]
or
drv:\path\RighTime /M4 [for COM4]
Several ports can be simultaneously monitored, for example:
drv:\path\RighTime /M1 /M2
DCD monitoring can be disabled with
drv:\path\RighTime /M0
For DCD monitoring to function properly, the active modem control
string must contain "&C1" for Hayes-compatible modems. This will
cause DCD to properly reflect the presence of carrier. If DCD is
stuck on and a /M switch specifies that port, RighTime will never
be permitted to function. If you run RighTime to display a
status report, the current DCD state will be reported. It should
normally report "... DCD monitoring is enabled", not "... DCD
active, RighTime function suspended".
Microsoft Windows users (in 386-Enhanced mode) will need to
prevent a false contention report by clicking on Control Panel,
386-Enhanced, then select Never Warn for each affected port, then
OK.
Normally, RighTime learns from each time set. Some programs invisibly
set the clock - in most cases for no apparently good reason - which
disturbs RighTime's learning. If RighTime is run with logging enabled
[/G], all time and date sets will be logged, and each log entry,
displayed by running RighTLog, identifies the program name of the
source of the time or date set. Once the sources of the offending time
or date sets are identified, RighTime can be selectively controlled to
ignore those errant sets. There are three approaches that work equally
well.
1) As when temporarily disabling RighTime in the examples
above, the offending program can be preceded by a RighTime
command which will cause the time sets to be ignored as if
the program never issued them. If the program always
issues a pair of sets, one for the date and one for the
time, RighTime can be directed to ignore the following two
sets with
drv:\path\RighTime /I2 [ignore next two sets]
OffendingProgramHere
If the program issues only a time set, it can be ignored
with
drv:\path\RighTime /I1 [ignore following set]
OffendingProgramHere
In each case, once the specified number of sets to be
ignored has been issued by the offending program, RighTime
will resume normal function, accepting and processing time
and date sets. If there are several offending programs,
each will need to be treated similarly.
2) Another method, useful if the offending program issues a
variable number of sets, is to precede the program with a
RighTime command which causes all time and date sets to be
ignored until further notice. The program can then be
followed by a Rightime command which discontinues ignoring
time and date sets. A small batch file might look like
drv:\path\RighTime /I-1 [ignore all sets]
OffendingProgramHere
drv:\path\RighTime /I0 [resume allowing sets]
3) A logical extension of that method is to issue the /I-1 in
the AUTOEXEC.BAT invocation of RighTime. This will cause
all time and date sets to be ignored, regardless of the
source - even the DOS prompt TIME and DATE commands - until
otherwise directed. Legitimate time sets - say, from
TimeSet - can be permitted by surrounding the TimeSet
invocation with the inverse of the commands above, i.e.
drv:\path\RighTime /I0 [allow sets]
TimeSet
drv:\path\RighTime /I-1 [resume ignoring all sets]
TimeSet v7.10 or later, however, provides for this ability
through its RighTime Control Panel, so no additional
RighTime commands are required.
Learning itself can also be disabled. This allows for time sets that
will not affect the current corrections. The corrections are
essentially fixed while learning is disabled. Learning can be disabled
in the AUTOEXEC.BAT RighTime invocation and it can be temporarily
controlled by TimeSet v7.10 or later. It cannot be disabled at any
other time. To disable learning, add the /L0 switch to the
AUTOEXEC.BAT RighTime invocation.
In the registered version only, two additional options are allowed:
drv:\path\RighTime /Q [silences minor error reports and
disables self-testing]
drv:\path\RighTime /V0 [non-verbose mode produces no screen
output (including errors), is completely
silent, and disables self-testing]
TestTime
Included with RighTime is a program tool that can provide some
interesting insight into the relationship of the clocks in your system and
the function of RighTime. TestTime takes no command line parameters. It
will determine and express whether or not RighTime is running in the system,
tests and reports on some critical modes, and it provides a continuous single
line display of the clock system status.
The status line is straightforward:
CMOS=date:hh:mm:ss DOS=date:hh:mm:ss.hh !Appl=+0.00 Meas=+00.0000
where:
CMOS is the CMOS RTC clock data. The equal sign that follows "CMOS"
will flash at a one second rate if the CMOS RTC interrupts are normal.
DOS is the DOS system clock data, including hundredths. The hundredths
digit might appear to be less than a blur due to your video vertical
scan rate. It should be possible to see the difference between 0.01
second DOS clock mode and the standard 0.055 second mode [/TH].
Appl is the current correction being applied to the DOS clock in
hundredths, if RighTime is resident. The exclamation mark (!) before
it indicates the moment that the DOS clock is corrected. This normally
occurs every four seconds, but can be skipped occasionally if internal
resources don't allow it.
Meas is the signed time difference between the CMOS RTC and DOS clock
in seconds, resolved to four decimal places (tenths of milliseconds).
A positive difference indicates that the DOS clock leads the hardware
clock (it displays a higher, later, advanced time). Under normal
conditions, this value should be well within a few milliseconds
(normally it is within a few tenths of a millisecond) of the "Appl"
value. It is usually possible to directly view the clock drift at this
resolution; the difference will increase for awhile, then suddenly
revert back to a value close to the "Appl" value each time the DOS
clock is corrected.
You can use TestTime to learn much about the behavior of the two clocks
in your system. Try running it without RighTime installed and notice that
the DOS clock is never the same as the hardware clock. Set the time and run
TestTime again. If your DOS sets the hardware clock, check to see if the
seconds are synchronized, which is indicated by a Meas value of zero. They
probably are not. Run TestTime some time later and see if the relationship
between the clocks has changed; there's a good chance that it will have.
Which, if either, is correct? Notice also that the Meas value flops around
several hundredths of a second; this is due to the 0.055 second standard DOS
clock resolution. Try these things with RighTime installed and see the
difference for yourself. If RighTime is doing its job, you should see that
Appl and Meas are essentially the same value - the former is the cause, and
the latter is the effect.
TestIncr
TestIncr measures and displays the difference between one unique DOS
clock time and the next. With RighTime running normally, this value should
always be 0.01 second. Without Rightime running or when the 0.01 DOS clock
mode is disabled [/TH], the value will average about 0.0549 second. TestIncr
is for disbelievers.
ViewCMOS
ViewCMOS displays the content of the CMOS RAM. It can be useful to the
adventurous RighTime user who is searching for an available area in which to
store the corrections. Be warned once again, though, that it is not easy to
identify such a space. Further, even if many zeros appear to suggest that an
area is unused, remember that zero is a perfectly valid number that might be
significant to the BIOS, and that, even if available, the entire CMOS RAM
might be checksummed. A bad checksum will result from any changes that are
not brought about by the BIOS itself. The next boot might fail, forcing you
into Setup.
On systems that contain additional CMOS RAM that is addressed like PS/2
MCA CMOS (the 386SL, for example), its presence is indicated. The
full-screen display can be switched from conventional CMOS RAM to the
MCA-type CMOS RAM contents.
RighTLog
If RighTime is run with logging enabled [/G], file RighTime.Log will be
present in the directory from which RighTime is run. RighTLog will display
this binary file. Each time-related activity will be logged.
The most important of the log's indications is the source of each time
and date set. If a time or date set is present whose source you do not
recognize, it is likely that the time is being set by a program that has no
business doing so. These sets will disturb RighTime's learning and can
compromise the accuracy of the system clocks. As discussed above, these
errant time and date sets must be ignored with RighTime's /I switch.
Each timeset log entry also notes the percentage of time since the last
timeset that the system was warm. If this value is much smaller than you
think it should be, RighTime might not have been active when you thought it
should have been. The most common cause of this is using a /M switch that
monitors a communication port whose DCD is stuck active. You might need to
make "&C1" a default for your Hayes-compatible modem by doing the following:
from within a communications program (ProComm, QModem, Telix, etc.),
Type ATZ and press Enter [you should get an OK]
Type AT&C1&W and press Enter [you should get an OK]
This will initialize your modem to the required DCD mode at power up
and, unless changed, each time "ATZ" is sent to the modem.
Communication programs can change it, though; if you continue to have
this problem, you'll need to do some more study.
/GA will also log each CMOS RTC adjustment. These entries can become
annoyingly numerous if the warm correction value is large. /GA is not
normally required.
Command Line Syntax
RighTime must be executed in the AUTOEXEC.BAT (or a batch file called
by it) so that it becomes a resident extension of DOS. Most of the 28
options available can be expressed at this initial resident invocation.
RighTime can also be run as a transient program at the DOS prompt to change
modes or to report on its current status. A smaller number of options are
effective in the transient execution. Each option listed below indicates
when - resident or transient or both - it can be used. The options are not
case sensitive (either /f or /F will work) and space between options is not
required. There must be no space between an option switch and its associated
parameter.
RighTime [/F[M|R]|/R[[M]n]|/N] [/Un] [/W[n]] [/C[n]] [/Dn] [/L0]
[/In] [/G[A]] [/K|/T[H|D|A]|/E] [/Mn] [/A] [/Sn] [/Yn]
[/On] [/Xn] [/Hn] [/Q] [/V0]
Storage: /F=File[com|cor] /R=cmosRam[[Mca]addr] /N=None /Umin=Update
Correction: /W[Warm] /C[Cool] /Dmin=warmupDelay /L0=noLearn
State: /Inum=Ignoreset /K=Kill /T=Tempdisable[Hund|Dos|All]
/E=Enable
/Mport=comport(s) /A=autoseAsonchange /Sdays=autotimeSet
Other: /G=log[All] /Ohunds=Offset /Xhours=eXtrapweight
/V0=notVerbose /Ycolor=forceansi.Sys /Hbytes=stacklengtH
/Q=Quiet,noselftest
where:
/A Automatic Daylight/Standard time change. Implements the American
standard biannual one hour adjustments at 0200 local time on the
first April and the last October Sundays whether the machine is
running or not. If RighTime is running, there will be no
detrimental effects caused by the time change. If the machine is
not running, the time change will shift the time-since-last-time-
set by one hour which will, in turn, have an effect upon the next
time set's learning. The error will normally be small and will
diminish with subsequent time sets. The Dallas Semiconductor
DS1287 and DS12887 and Motorola's MCCS146818B1M properly
implement the time change rule as do most modern brand name
chipset-based machines, but many machines are supplied with the
Motorola MC146818P or its equivalent even today. Although they
might have been manufactured as late as mid-1991, these parts
will misbehave in April, advancing the clock on the last Sunday
(which was the convention prior to 1986). Some modern
chipset-based machines will not change at all.
[Applicable in resident invocation only.]
/Cn Sets the initial cool correction rate.
(default 0, maximum +327.67 or -327.68).
[Resident only]
/Dn Changes the cool adjust period allowance (after boot) from the 30
minute default. The valid range is 0 to 60. Consider this
option if your system exhibits a large difference in warm and
cool corrections and cabinet temperature is suspect, or if you
need to disable cool correction.
/D0 Disabled cool correction. Applies the warm correction
value at all times and learns only a warm correction value
from observed error. This is useful to users who never
shut down their systems or who switch to and from other
operating systems that cannot run RighTime.
[Resident only]
/E Reenables all temporarily disabled RighTime functions.
[Transient only]
/F (or /FM) Directs RighTime to store corrections in and retrieve
corrections from its own program file.
/FR Directs RighTime to store correction factors in
RIGHTIME.COR, a data file that will be created in
RighTime's directory.
[Resident only]
/G Activity logging. Creates and maintains a comprehensive file of
all user and program time-related activities. It produces a
binary file, RighTime.Log, which is displayable with program
RighTLog. This is an informative and valuable diagnostic tool.
/GA Includes routine one-second CMOS clock adjustments. On a
machine whose warm correction is large, these will be
frequent and will clutter the log.
[Resident only]
/Hn Internal stack length. The default is 160 bytes; valid range is
64 to 1024 bytes. Since RighTime is an operating system
extension, its stacks might be used by other programs for brief
periods. RighTime reports on current internal stack usage.
Following a system crash, when RighTime is restarted it will
report on the stack usage prior to the crash (/F and extended
CMOS /R, only). If the crash was due to insufficient stack
space, this parameter value must be increased. There is no
relationship between this option and the STACKS command in
Config.Sys. [The /H switch of RighTime version 1.1 (for DR DOS
5.0) is no longer available, but a similar effect can be achieved
by using /O-3.]
[Resident only]
/In Ignore time and date sets, semi-permanently (/I-1, restored via
/I0) or for a specific count (e.g. /I2) to prevent the spurious
time and date sets of GEOS (America Online users take note),
several Norton utilities, games and other facilities from
confusing RighTime's learning and to allow time comparison
without setting.
[Resident or transient]
/K Terminates (kills) RighTime function. The memory that is
occupied by RighTime remains allocated and unavailable.
[Transient only]
/L0 Disables learning. The program ignores errors at time set and
applies fixed corrections. This is useful to programs that reset
the DOS clock and use it as an event timer.
[Resident only]
/Mn Directs RighTime to suspend all functions (except time and date
set and read processes) while the specified communications port
indicates that DCD (Carrier Detect) is active. n may be any of
1 through 4, corresponding to COM1 through COM4. This option
prevents RighTime from potentially interfering with high-speed
communications functions; it is usually only required for modem
speeds of 9600 bps and above. Normal function will resume when
communications activity ceases. PROPER DCD CONTROL REQUIRES THAT
&C1 BE PART OF THE ACTIVE HAYES-COMPATIBLE MODEM INITIALIZATION
STRING. Several /M switches may be specified; for example, a
system with both COM1 and COM2 high-speed modems installed would
have /M1 /M2 specified in RighTime's invocation. /M0 disables
DCD monitoring until the next /M invocation. Microsoft Windows
might erroneously report that a communications port is in
contention when a /M switch is used; this can be avoided by
clicking on Control Panel, then 386-Enhanced, selecting the Never
Warn button for each affected port, then OK.
[Resident or transient]
/N Disables correction storage. Learned corrections will be lost at
shutdown and there will be no cool correction possible.
[Resident only]
/On Offset allows DOS clock trim in seconds. Default is 0; the
valid range is -90.00 to +90.00. This can be used to anticipate
relay and contactor actuation delays and motor start times in
process control system applications;
[Resident only]
/Q Defeats self testing and quiets minor status messages.
[Resident or transient]
/Rn Directs RighTime to store corrections in CMOS RAM.
/Raddr directs RighTime to store corrections in CMOS RAM. The
default address is 63, but it is increasingly unlikely that this
will be a usable address; the address can range to 127. The
specified location is that of the last of 12 bytes for the
default address, or the last of 22 bytes for any other location.
Using the default will not provide full features and is
maintained for compatibility with earlier RighTime versions.
This option is potentially harmful, since a careless value might
allow RighTime to overwrite setup data. Inadvertently changing
a hard disk type, for example, can lead to sadness. Be careful.
/RMaddr will place the corrections in MCA-type CMOS RAM. There
is no default: an address must be specified. The specified
location is that of the last of 22 bytes. The valid address
range is 22 to 127 for 82360SL-type CMOS RAM and 274 to 2047 for
PS/2 MCA-type CMOS RAM.
[Resident only]
/Sn Changes the period that must elapse since the last timeset before
RighTime will set the corresponding program termination code.
The termination code can be tested with the IF ERRORLEVEL command
in a batch file. If this switch is not expressed, the default
period is 28 days. If more than the specified period has elapsed
since the last time set, RighTime will terminate with ERRORLEVEL
set to 1.
[Resident or transient]
/T Temporarily disables RighTime functions.
/TH disables 0.01 second DOS clock maintenance.
/TD or /T disables DOS clock maintenance. CMOS clock
maintenance continues. This mode can persist
indefinitely.
/TA disables all RighTime functions (including logging)
and reports the maximum safe disabled duration.
These disabled modes can be reenabled with /E.
[Resident or transient]
/Un Changes the CMOS RAM or disk file update period from the two
minute default. The valid range is 2 to 60, and the value must
be even. If you think the default is unnecessarily frequent, you
can decrease it by increasing this value. Remember that this is
part of the cool correction process, and less frequency might
affect correction accuracy in severe situations.
[Resident only]
/V0 Non-verbose. No screen output will be generated (including error
messages). Available to registered users only.
[Resident or transient]
/Wn Sets the initial warm correction rate in seconds per day
(default 0, maximum +327.67 or -327.68)
[Resident only]
/Xn Sets the error extrapolation weighting threshold. This can
desensitize RighTime's learning by decreasing the significance of
the observed error from any time set whose previous time set was
less than n hours ago by a linear factor (e.g. for the 4-hour
default, the observed error from the second of two timesets that
are one hour apart is considered only 0.25 significant), range 1
to 72 hours.
[Resident only]
/Yn Forces data highlighting if a non-standard ANSI.SYS is
undetectable or if colors other than the white-on-black default
are desired. n is normally a two-digit value whose first digit
represents the background color, while the second digit
determines the foreground color. Standard ANSI color numbers are
expected:
0=Black 4=Blue
1=Red 5=Magenta
2=Green 6=Cyan
3=Yellow 7=White
White-on-red, for example, results from /Y17. To force the
default on a non-standard ANSI driver, use /Y07 or simply /Y7.
/Y0 Automatic significant data highlighting (if ANSI.SYS is
present) is defeated with /Y0. To produce a text file of
RighTime's report without ANSI sequences, use /Y0,
redirected to disk.
[Resident or transient]
/? On screen help memory jogger. This is automatically produced if
the command line contains a syntax error.
[Resident or transient]
A sophisticated AUTOEXEC.BAT invocation of RighTime might be:
C:\RT2\RighTime /G /FR /D0 /U20 /S7 /A /M1 /Y57 > C:\RT2\RIGHTIME.RPT
IF ERRORLEVEL 255 ECHO "** Trouble with RighTime load **"
IF ERRORLEVEL 1 TIMESET [in automatic configuration]
.
.
.
TYPE C:\RT2\RIGHTIME.RPT
Errorlevels
RighTime provides four unique termination ERRORLEVELs. The ERRORLEVEL
value can be tested in a batch file to guide subsequent operations.
Code value Indication
0 Installed normally, cool correction within range, last
timeset within specified elapsed period.
1 Installed, cool correction within range, but more than
the specified period has elapsed since a timeset.
2 Installed, but cool correction was out of range (the
system has been inactive too long), so a timeset is
externally required.
255 Not installed due to syntax error, insufficient memory,
incompatible hardware, etc.
These codes can be tested in a batch file with the IF ERRORLEVEL
command. For example, if the ERRORLEVEL value code is 1, then more than 28
days have elapsed since the last timeset (this duration can be changed with
the /S option). It would be wise to have a NIST telephone service time
setting program such as TimeSet automatically set the time in this situation
to prevent RighTime from exceeding its one month limit, or you could cause
execution of the system DATE and TIME commands to urge the user to set them
manually.
If You Have Trouble
Please note the symptoms and circumstances as thoroughly as is
reasonably possible and contact
Tom Becker
Air System Technologies, Inc.
14232 Marsh Lane, Suite 339
Dallas, Texas 75234-3899 USA
BBS: 214/869-2780
Fax: 214/869-1166
CompuServe: 76436,3210
Telephone: 214/402-9660
Software License Agreement
When you register, this will be the agreement between you (the user)
and Air System Technologies to which both parties are bound upon the payment
and acceptance of the license fee, which is part of the registration fee.
Grant of License
In consideration of the payment of each license fee by the user to Air
System Technologies, Air System Technologies will license to the user a
nonexclusive right to use one copy of each of the software programs on one
computer at a time. The license is expressly for program use only, per the
terms of the license. No other rights are implied.
Ownership of Software
Air System Technologies is the owner of the software programs and holds
full title to them. The user may own the physical media on which the
software programs are recorded, including the original disk which is provided
by Air System Technologies to the user, but the user does not own the
software programs nor any copy of the software programs.
Copies
The software programs and the documentation are copyrighted and
therefore may not be copied without permission. Permission is granted to the
licensed user to make copies of the software programs and the documentation
as required in the conventional course of computer system data backup.
Permission is granted to copy the shareware distribution file in its
complete, unmodified form. No other permission to copy is granted.
Use and Transfer
The Grant of License applies only to one copy of each of the software
programs. Simultaneously functional resident copies of the software programs
each require licensing. You may not transfer any copy (except the shareware
evaluation distribution file) of the software programs to a computer which is
not under your control, nor may you rent, lease, sell or otherwise assign
control of the software programs to anyone.
Termination
The license is in effect until it is terminated. When the license is
terminated, the user's rights that are granted by the license are revoked.
The license is automatically terminated without notice upon violation of any
of its terms.
Disclaimer of Warranty
No warranty of performance or suitability is expressed or implied.
Every effort has been made to make the software programs deliver as the
documentation describes, but the correctness for your application or
environment cannot be assured. Air System Technologies cannot assume
responsibility for the failure of the software programs, nor for any
consequence of their use.
RighTime Use Registration Form RighTime Evaluation Version 2.53
Fill out this form, enclose the required funds and mail to:
Air System Technologies, Inc.
14232 Marsh Lane, Suite 339
Dallas, Texas 75234-3899 USA
I would like to register the use of RighTime.
Name:________________________________________________________________
Business name:_______________________________________________________
Address:_____________________________________________________________
_____________________________________________________________
City:______________________________ State:_________ Zip:_____________
Telephone:_________________________
Where did you get RighTime?__________________________________________
Registration is required for each copy of RighTime that is
simultaneously machine resident.
The registration fee is US$ 40.00 each up to 10 copies. Call for
larger quantity pricing.
How many copies of the RighTime package do you want?_________________
On what media? 5.25"/360K______ 3.5"/720K______
Total enclosed: US$____________
Make your check or money order payable to Air System Technologies.
Does your business require an invoice?____________
Thank You!