lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicholas Knize (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-7014) Use TimeUnit.TARGETUNIT.convert() to convert between time units
Date Tue, 29 Mar 2016 12:57:25 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-7014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nicholas Knize updated LUCENE-7014:
-----------------------------------
    Fix Version/s:     (was: 6.0)
                   6.x

> Use TimeUnit.TARGETUNIT.convert() to convert between time units
> ---------------------------------------------------------------
>
>                 Key: LUCENE-7014
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7014
>             Project: Lucene - Core
>          Issue Type: Improvement
>    Affects Versions: master, 5.4.1
>            Reporter: Ahmet Arslan
>            Priority: Minor
>             Fix For: master, 6.x
>
>         Attachments: LUCENE-7014.patch, LUCENE-7014.patch
>
>
> Re-phrased from [~steve_rowe]'s [comment|https://issues.apache.org/jira/browse/LUCENE-6823?focusedCommentId=14941283&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14941283]
:
> System.nanoTime(), which is guaranteed to be monotonic, is now used to recored elapsed
times. In several places, conversion from nano seconds to some target unit (e.g. seconds,
milli seconds) is performed using hard-coded conversion constants, which is prone to mistakes.

> It would be nice to use {{TimeUnit.TARGETUNIT.convert(sourceDuration, TimeUnit.SOURCEUNIT)}}
instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message