[concurrency-interest] Small request regarding TimeUnit

Dhanji R. Prasanna dhanji at gmail.com
Wed Jan 17 04:55:31 EST 2007


I was not aware that java was standardized on SI?

in fact there is a whole jsr devoted to expression and calculation of units:
http://jcp.org/en/jsr/detail?id=275

Even this JSR supports non-SI systems. It seems presumptuous to bind service
code to a presentation paradigm based on SI if there is an effort to
standardize (and abstract) the expression of units.

On 1/17/07, Kasper Nielsen <kasper at kav.dk> wrote:
>
> Dawid Kurzyniec 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.
> >>>>
> >>> I think MICROSECONDS might be problematic. Should it print u, or µ
> >>> ?... I guess, depending on the context, people might want to have it
> >>> either way.
> >>>
> >>> D
> >>>
> >> I would vote for µ, anyway should be a matter of a simple
> >> .replace('µ','u') if people wants u instead
> >>
> >
> > Actually, there is more questions. hours vs hrs, min vs mins vs m, etc.
>
> Dawid, all the different units in TimeUnit have a well established
> symbols within the SI system.
> ns = nanoseconds
> µs = microseconds
> ms = milliseconds
> s = seconds
> min = minutes
> h = hours
> d = days
>
> Take a look at http://physics.nist.gov/cuu/Units/prefixes.html and
> http://physics.nist.gov/cuu/Units/outside.html
>
> - Kasper
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20070117/72e786e5/attachment.html 


More information about the Concurrency-interest mailing list