[concurrency-interest] Timeunit.convertMillies()

Kasper Nielsen news@kav.dk
Wed, 10 Sep 2003 12:57:50 +0200


Hi,

I was wondering if it was possible to add a unit.toMills() function to 
TimeUnit just like there is allready a unit.toNanos().

I find myself writing a lot of
unit.convert(time, TimeUnit.MILLISECONDS)
in all my calls to sleep and wait, would be much nicer with just
unit.toMillies(time);

It would also avoid the risk of people using 
TimeUnit.MILLISECONDS.convert(time, unit) by mistake.

regards
   Kasper