Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: manpage mentions old TIMEFMT



Christian Neukirchen <chneukirchen@xxxxxxxxx> writes:

> Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> writes:
>
>> On Sat, 14 Apr 2012 16:32:48 +0200
>> Christian Neukirchen <chneukirchen@xxxxxxxxx> wrote:
>>> >> Finally, %X and %D are rubbish on Linux (but GNU time(1) always shows
>>> >> 0 for them).
>>> 
>>> I'd prefer if they were 0 instead of -9223372036854775808...
>>
>> I don't know where this is coming from, but the shell does initialise
>> the structure when it's created, so something in the shell is actually
>> setting a value --- unless it's the effect of dividing by a zero total
>> time.
>
> That was indeed the case:
>
> juno ~% TIMEFMT="%X %D %E"
> juno ~% time sleep 0
> -9223372036854775808 -9223372036854775808 0.00s
> juno ~% time sleep 1
> 0 0 1.01s

There seem to be other case of division by zero, too:

make -v  0.00s user 18446744073.71s system -2147483648% cpu 4M memory 0.004 total

-- 
Christian Neukirchen  <chneukirchen@xxxxxxxxx>  http://chneukirchen.org



Messages sorted by: Reverse Date, Date, Thread, Author