avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] Adding elapsed time


From: Theodore A. Roth
Subject: Re: [avrdude-dev] Adding elapsed time
Date: Tue, 29 Jul 2003 17:39:18 -0700 (PDT)

On Tue, 29 Jul 2003, Brian Dean wrote:

:)On Tue, Jul 29, 2003 at 03:17:07PM -0700, Theodore A. Roth wrote:
:)
:)> This should be trivial to add with the new report_progress now in place. I 
:)> will have to leave this for someone else to implement though since I need 
to 
:)> get back to gdb stuff.
:)
:)How about the following patch (attached)?  Here's the output:

<snip>

:)
:)The time updates continuously with the percentage, except for the case
:)of '_no_tty()', when it is displayed at the very end.
:)
:)I'm using 'gettimeofday()' to get the current time.  Hopefully that
:)works with Windows.

It's usually a bad idea to test for equality with a float since the equality 
may never be true due to the nature of floats (does 0 == 10^-400?).

I'd suggest just resetting the timer to 0 when the header is passed since 
that is supposed to indicate that an operation is starting.

Been too long since I had to deal with gettimeofday(), so I can't pass 
judgement on that.

Just my 2 cents, maybe less. ;-)

Ted Roth





reply via email to

[Prev in Thread] Current Thread [Next in Thread]