You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Nicholas Knize (JIRA)" <ji...@apache.org> on 2016/03/29 14:57:25 UTC

[jira] [Updated] (LUCENE-7014) Use TimeUnit.TARGETUNIT.convert() to convert between time units

     [ 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