On Mon, Oct 08, 2001 at 03:20:58PM -0400, Glenn Maynard wrote:
> > Try eprintf(""), it should clear status line.
>
> Er, all that does is write to stderr ... we need to call
> CmdExec::status_line::Clear(), I think. I guess a message needs to be
> propagated up to CmdExec to do that. That seems tricky: we need to go
> from FileCopy::Do all the way up to the CmdExec, and only do this if
> it's the foreground job (can't have background jobs clearing the status
> line.) And since FileCopy isn't a job, it doesn't have a parent leading
> us to CmdExec.
Right, FileCopy is not a Job. So, unfortunately, eprintf trick won't work.
(eprintf calls parent->vfprintf, CmdExec traps that and clears status line).
> Well, operator math should probably return another Time object; if it's
> needed as a float, another function can do that.
Time difference is not quite the same as time. Another class? Is it worth
the trouble? Time difference in milliseconds is enough for lftp, I think.
> (This kind of stuff is
> costly for strings, but cheap for an 8-byte time structure that can
> probably be passed around on the stack.)
BTW, I don't like using struct timeval except in gettimeofday call.
Just define two Time members, seconds and milliseconds.
--
Alexander. | http://www.yars.free.net/~lav/