[concurrency-interest] Small request regarding TimeUnit
Dhanji R. Prasanna
dhanji at gmail.com
Tue Jan 16 18:55:38 EST 2007
On 1/17/07, Dawid Kurzyniec <dawidk at mathcs.emory.edu> wrote:
> Kasper Nielsen wrote:
> > Dawid Kurzyniec wrote:
> >> Kasper Nielsen wrote:
> >>> Hi,
> >>> Whenever I use TimeUnit and need to do any reporting in regards to
> >>> that. I often prefer outputting the actual unit in a short notation,
> >>> for example, ns instead of nanoseconds, µs instead of microseconds,
> >>> I think it would a small but usefull addition (for some) to add some
> >>> kind of
> >>> String getShortForm() method to TimeUnit.
> Actually, there is more questions. hours vs hrs, min vs mins vs m, etc.
> Personally, I think that this belongs to presentation layer, and should
> not be mixed with the concurrency API.
Yea I agree strongly. Also isnt a lot of this locale-specific? what is the
point of resolving SECONDS to a string "seconds" when it might be "sekunden"
or something else that is desired by the client code? I am not sure what the
semantics of short-hand notation are, but I would guess they are similar.
Some organizations like to write "secs" as shorthand for seconds, some use
"s", others, capital "S"
The conversion is best done with a class provided by the presentation/client
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest