          
               
                                    
                                     
                               
                                        
                                     

                               Timer version 1.22
                             by Eugene Toder, 2001.

                                  LEGAL NOTICE
           This program is freeware. I'm not responsible for any
            results of using Timer. You use it on your own risk.
                  There is no warranty for this software.

 In this file 

   1. Minimal system requirments.
   2. What's this?
   3. How to use.
   4. History.



1. Minimal system requirments.

   286 processor (without coprocessor)
   DOS 3.30 (I think)

  And that's all!



2. What's this?

    Timer is very useful programm (I hope) when you what to find out your
programm's execution time (for example, you have some time limits or you
just want to optimize algoritm). Timer allows you to do it. If you have
several tests, you can run timer from batch file and write results to log
file if necessary. Timer uses BIOS daily timer counter, so it will work
correctly with all programms, that doesn't do any tricks with system time.



3. How to use.

    You can use timer in two ways.
    The first way is to use R (run) command. Syntax is:

    > TIMER [R] <shell_command>

    NOTE: R is in square brackets because it's optional. Actually you
should put it only if shell_command is "r" too (than run "timer r r").
    Shell_command is ANY valid shell command (e.g. "dir") or .com, .exe or
.bat file.

    For example, you what to find out PROG.EXE programm execution time. And
this programm takes to 2 arguments - you what to specify "A" and "10". So,
your command should look like this:

    > TIMER prog.exe A 10

    This would run prog.exe with arguments "A" and "10" and show you
execution time. Your program should be in current directory or in any
directory included in your PATH system variable. You can omit programm
extension. In this case timer will search first for .com, than for .exe and
than for .bat file. You can also save time in log file and dissable showing
it on screen (see below).

    The second way it to use A (start) and O (stop) commands. Syntax is:

    > TIMER A
    > <shell_commands>
    > TIMER O

    To use timer in this way you'd better write small batch file. Batch
file for previous example should look like this:

    prog.bat:
    TIMER A
    PROG A 10
    TIMER O

    and run like this:
    > prog.bat

    or like this:
    prog.bat:
    TIMER A
    PROG %1 %2
    TIMER O

    and run like this:
    > prog.bat A 10

    Precision in this case is slightly lower then when you use R command
but you still have 2 reasons for using this timer way:
    1. some programms won't run when you use R command (there won't be
enough free memory for them and etc.)
    2. you can run several programms and get total execution time.

    Timer has some more features called options. If you want to use options
you should specify them after command but before command's parameters.
Syntax is:

    > TIMER <command> [options] [command_parameters]

    Options are:

    /Q - quiet mode. Use with commands O and R when you don't want to print
execution time on screen.
    /L<log_name> - set log file. Use with commands O and R when you what to
save execution time in file. If in first exmaple we want to save time in
file PROG.LOG and don't want to show in on screen we should use:

    > TIMER R /q /lprog.log prog.exe A 10

    /O - overwrite log. If this option is specified log file will be
overwritten (by default it'll be appended).
    /G - long execution times mode. Use this option if your programm
execution time is 24 hours or greater. If this option is specified not only
current time but current date will be saved, so execution time may be
almost unlimited. Use this option with A and R command, usage with O
command is optional (O command will detect this mode automaticaly).
    /N - not redirectable output. When you use output redirection for
tested programm timer's output will be also redirected. For example, when
using

    > TIMER prog A 10 > prog.out

    timer will also write to file prog.out. If you want timer to write on
screen you should you this option:

    > TIMER /n prog A 10 > prog.out

    All prog's output will be in prog.out, but timer's output will be on
console.


    All commands and options are case-insensitive. You can use '-' instead
of '/' with options.

 Comments, suggestions, bugs - please send me mail to eltoder@hotmail.com.



4. History.

Version 1.22
+ /N option (not redirecable output) added
+ Always exiting on errors now
+ Lesser memory usage
+ Packed with UPX!
+ Tried to make this file more readable ;)

Version 1.21
+ Ability of running batches and system commands with R
+ R command is default
+ Full revision, size reduced
+ Some small changes

Version 1.20
+ Fully rewritten
+ Program is almost 3 times shorter
+ Can be run on 286 and without coprocessor
+ R (run) command was added
+ Options were added
+ Q command was replaced with /Q option
+ Log file name moved to /L option
+ /O option (overwrite log file) was added
+ /G option (long times) was added
+ Precision is great
+ H, ?, /H, /? commands
+ Smart commands and options check
+ New errors and warnings system
+ Some bugs fixed
+ This file

Version 1.05
+ Time in temp file is stored in binary form (shotter)
+ Works over midnight
+ Output to screen was was added
+ Q (quiet stop) command was added
+ Log file is optional
+ Precision increased

Version 1.00
! First realese.