bug-gnulib
[Top][All Lists]
Advanced

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

Re: human-time?


From: Bruno Haible
Subject: Re: human-time?
Date: Thu, 10 Jan 2008 16:54:34 +0100
User-agent: KMail/1.9.1

Simon Josefsson wrote:
> This thread reminds me of this poor warning message from make:
>
> make: Warning: File `Makefile.am' has modification time 7.9e+02 s in the 
> future

This was already reported and fixed: see [1].

> There are humans that don't instinctual feel whether '7.9e+02 s' is a
> time difference in milliseconds or years...
>
> Compare this to the useful human.c in gnulib to print file sizes as
> human readable values, i.e. to print 2.5T instead of 2801285853933.
>
> Perhaps there is room for a module that works like:

Very good idea! I mean, some software like [2][3] already does this, and
it makes the output really understandable without thinking.

Can you write such a module?

The function should probably have a parameter controlling the precision
(1 or 2 units); for example 49 hours can be "2 days" or "2 days 1 hour".

Bruno


[1] http://lists.gnu.org/archive/html/bug-make/2007-10/msg00051.html
[2] http://git.savannah.gnu.org/gitweb/?p=gnulib.git
[3] http://web.cvs.savannah.gnu.org/viewvc/gnulib/?root=gnulib




reply via email to

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