home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
592b.lha
/
XTime_v1.0
/
XTime.doc
< prev
next >
Wrap
Text File
|
1992-01-05
|
5KB
|
125 lines
XTime v. 1.10
Copyright November 1991
Kurt R. Krueger and the Sirius Cybernetics Corp.
WHAT IS IT?
XTime (pron. "Transtime") is a program I wrote while teaching myself C.
XTime calculates the amount of time a file transfer will take. This can be
useful if you want to know how long a transfer will take before you actually
send a file (or before you receive it).
XTime operates in two modes: file and byte. In the first mode, you give it
a file name, and it will search out the file and calculate how long it will
take to send it. XTime uses UNIX-style wildcards: *, ?, [^, and \.
Byte mode was the only mode used in the last version. You simply put a number
after XTime, and the transfer time is calculated. How do you switch between
modes? Fortunately, XTime automagically figures out which mode you want, so
you don't have to worry. There is, of course, a way to trick XTime. Suppose
you have a text file that has the lyrics to Yes' 90125 album, and the file
name is 90125. If you type "XTime 90125", XTime will think you have a file
that is 90,125 bytes long. You can get around this in at least two ways.
Either use the -f option to force file mode, or type "XTime 9012?". As you
can see, the chances of XTime being tricked are quite slim.
Syntax: XTime [-k] [-r<cps>] [-f] <[file size in bytes] or [filename]>
[] means "optional"
<> means "manditory"
Thus, [-r<cps>] means that if you are going to use the -r option, then you
must put a number after it. It won't guru or anything, but your transfer
rate won't get changed, either.
There are only three parameters:
-f: Force XTime to only operate in file mode. I can't think of one time that
this would be necessary, but that does not mean that a situation doesn't
exist. It is always preferable to allow the user to choose, not the
computer.
-k: Size is in bytes. Thus, instead of typing "100000" for 100K, just type
"100". This option is automatically turned off in file mode.
-r: Change default transfer rate of 232 characters per second. For example,
if you typically have a rate of 240, type "-r240". Hint: Do not trust
the rate that terminal programs give as they are sometimes wrong.
HOW DO I INSTALL IT?
There are no special installation instructions. You might want to set it up
as an alias to simplify things, though. For example, if you typically have
rates of 240 cps and you prefer the -k option, you might want to do this:
Amiga: alias xtime c:xtime -r240 -k []
VMS: XTIME :== $SYS$LOGIN:XTIME -R240 -K
SUGGESTIONS
Please write me. (Note that if you tried in the past I inadvertently left
out part of my Internet address, so your mail no doubt bounced.)
Kurt R. Krueger
Internet: kkrueger@zeus.unomaha.edu
BITNET : kkrueger@unoma1
Please don't complain about the program's elegance or lack thereof if you are
a C guru. What do I know about structure? ;)
If you are using a VMS VAX, I would strongly suggest that you use SZ Shell for
all of your Z-Modem transfers. This is not so much because of the program's
many features and the ease of use it adds to SZ, but because I wrote it. You
can obtain this program from ab20.larc.nasa.gov. in the incoming/vms
subdirectory or by writing me.
PROBLEMS:
If you're sending a big batch of files, then there is about a second of delay
in between transfers. XTime assumes it's instantaneous, however. With the
modular fashion in which I wrote the program, fixing this nuissance would be
a pain, but I will get around to it in the next version. At any rate, the
amount of error is really small.
--
There is a small bug I can't fix. If you cd to a directory and have a file
in the directory above it that is 29-30 characters long, and you type this:
XTime /this_is_a_really_long_filename
You will get a "No files matched." error. Obviously, the odds of your running
into this in normal, everyday life are slimmer than the chances of my being
featured on CNN for writing XTime. Panu Hassi suggested a fix, but it didn't
work. Nonetheless, I'll track it down just for the sake of completeness. As
always, there is a way around the problem. This works:
XTime /this_is_a_really_long_filena*
Also, you can cd to the directory it's in and type:
XTime this_is_a_really_long_filename
--
XTime works over a relevant range. By that, I mean if you put in a value so
large that the total transfer time is greater than about 546 hours, then you
can expect nonsensical results. By the way, that's 456.130 megabytes of data
at 2400 bps. I don't consider this to be a bug, but I thought it was worth a
mention. The last version of XTime was much less tolerant. After around
eight hours, the results would be nonsense.
ACKNOWLEDGEMENTS:
-- Rich Salz, for writing Wildmat, the wildcard-matching utility. I had to
enhance it, but it made a good skeleton.
-- Abacus, for giving me a short program for handling the DOS.
-- Panu Hassi, for beta testing this and providing some debugging help.
He must have really put it through the wringer because he found the path
bug.