home *** CD-ROM | disk | FTP | other *** search
- ---------------------------------------------------------------------------
- ClockCheck 1.14 05-Nov-95
- ---------------------------------------------------------------------------
-
- Introduction
- ~~~~~~~~~~~~
- Did it ever happen to you that the battery-backed-up clock forgot the
- time, and you did a lot of work with the clock set to a strange date?
-
- If it did happen, then you probably had a lot of trouble finding out
- which files were newer than which other ones?
-
- That was exactly what happened to me, so I thought about doing a
- program that could check if the date is right or not; this is that
- program.
-
- Requires OS 2.04 (V37).
-
- Disclaimer
- ~~~~~~~~~~
- THIS SOFTWARE AND INFORMATION IS PROVIDED "AS IS". NO REPRESENTATIONS OR
- WARRANTIES ARE MADE WITH RESPECT TO THE ACCURACY, RELIABILITY, PERFORMANCE,
- CURRENTNESS, OR OPERATION OF THIS SOFTWARE AND INFORMATION, AND ALL USE IS
- AT YOUR OWN RISK. THE AUTHOR DOES NOT ASSUME ANY RESPONSIBILITY OR LIABILITY
- WHATSOEVER WITH RESPECT TO YOUR USE OF THIS SOFTWARE AND INFORMATION.
-
- Copyright
- ~~~~~~~~~
- This program is FREEWARE. It may be freely distributed as long as all files
- in it remain unchanged and are included in the distribution. Also no more
- than a nominal copy fee may be charged for the distribution. This program
- cannot be used for commercial purposes without written permission from the
- author.
-
- What's this program used for?
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- When I did this program, it was meant for users that have a battery-
- backed-up clock, but I now have realized that in can also be used by those
- that haven't got one. If so, you will have to set the clock after every
- power-up. Enough about that, I will now go on with a description of the
- original purpose of the program.
-
- When you eg. start a demo or an old game or something that crashes the
- computer, it sometimes happens that the clock has been set to some kind
- of maniac's time and/or date. Sometimes it can't be read at all.
-
- Normally, at this point, you won't notice that the clock isn't right, so
- you'll just go on saving files, copying files etc. When you realize that
- the clock is wrong, you set the clock, BUT.., all files that you have
- changed will have the wrong date. This might not look that important, but
- sometimes when you want to know which file is newer than another, you
- will have big trouble finding out the real dates.
-
- BUT... :)>-=>
-
- If you use ClockCheck, this will happen:
-
- When you boot the computer, clockcheck will compare the date against the
- old date that was saved the last time you booted (ran ClockCheck).
- If the current date is older than the saved date OR the current date is
- the same / too much newer than the saved date, ClockCheck will put up
- a requester telling you what's wrong.
-
- When the requester pops up you will see the (computer's) current date.
- Now you should check if the date is the same as the real date.
- If the date was right, just click 'RIGHT', otherwise click 'WRONG'.
-
- If you clicked 'RIGHT', the date will be saved to the file and the computer
- will continue the boot procedure as usual.
-
- If you clicked 'WRONG', then this will happen;
-
- The date will NOT be saved to the datefile.
-
- The program will end with a WARN code.
-
- If you have these lines after clockcheck, the timeprefs will pop up,
- allowing you to adjust the date and time to the correct ones:
-
- If WARN
- SYS:Prefs/Time
- EndIf
-
-
- I hope this will make the function of the program clearer. This wasn't
- here in the original release of version 1.13, but as I've heard that there
- has been some problems to realize the real function of this program, I've
- decided to include this description in the version that I'm uploading
- to AmiNet.
-
- The program has not been modified, just the document.
-
- Installation
- ~~~~~~~~~~~~
- ¤ Set the clock to the current time and date.
- ¤ Copy the file ClockCheck to the c: directory (or anywhere else).
- ¤ Run ClockCheck. The first time the program will create a file named
- ClockCheck.time in the ENVARC: directory.
- ¤ You should insert the line 'ClockCheck' in your s:User-Startup.
-
- The program also has a couple of arguments:
-
- DAYS=N With this you can specify the maximum number of days that you want
- shall be able to pass without notifying. The default is 1.
- Replace N with a number corresponding your needs.
-
- TIMEFILE This is used to specify an other file where the date will be saved.
- The default is ENVARC:ClockCheck.time, but if you eg. use a kick-
- switch and have two different ENVARC:s (one for both kickstarts),
- then it can be better to define a name yourself.
-
- USEVARS If you specify this, two variables will be written at every boot,
- LastBootTime and LastBootDate. Can be useful for scripts.
- Contains the time and date of the last boot respectively.
-
- VERBOSE Print out the last boot time and day at every boot.
-
- The program checks if the date is earlier or the too much later than the
- old date (the date saved in the file ENVARC:ClockCheck.time).
-
- Using ClockCheck in script-files
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- If you want to have the time-prefs executed automatically if the date
- was not right, then you can do like this:
-
- .....
-
- ClockCheck Days=7
-
- If WARN
- SYS:Prefs/Time ; Or any other path/program
- EndIf
-
- ....
-
- (insert these lines into your user-startup).
-
-
-
-
- History
- ~~~~~~~
- 1.0 (Stoneage) Initial release
- 1.1 (Stoneage) I got a request that I should add a WARN returncode if the
- date was not right (i.e. you selected 'Don't Save' in the
- requesters).
- See above for examples. I also optimized the code a bit
- (168 bytes smaller :^)
- 1.11 17-Oct-94 Minor modifications, and 'bug' fixes:
- I changed the version string.
- Changed it, so that the prefs file will be saved in ENVARC:,
- instead of in s: (the program was so old that I had used s:
- to save the prefs).
- Discovered a 'bug' in the text that is written the first time
- you run ClockCheck, the filename was incorrect.
-
- 1.12 10-Nov-94 Don't remember...
-
- 1.13 17-Dec-94 Optimized. Added an argument (TF=TimeFile) for specifying the
- name for the datefile. Added a small text that shows how much
- time that has gone since you booted (ran the program) last
- time. This can be interesting if you are debugging or
- something, and the computer crashes all the time =).
-
- 1.14 05-Nov-95 The old source was lost, so I had to reconstruct the whole
- thing, but now it's finished.. I'm doing my military duty now,
- I've been there since 12th June this year, and I'm going to
- bee there to the 29th March 1996..
- - Det finns en plats på jorden, där solen aldrig ler,
- den platsen heter Boden, dit vill jag aldrig mer...
- So,
- to the new things. RESET argument removed (not needed anymore)
- VERBOSE and USEVARS arguments added.
- BootCount added. It will display the total amount of boots,
- since you installed ClockCheck.. Just an interesting thing.
-
- ---------------------------------------------------------------------------
-
- Send bug reports, ideas, PD Programs etc. to:
-
- Staffan Hämälä
- Pellovägen 268
- S-957 93 Pello
- SWEDEN
-