[ https://issues.apache.org/jira/browse/LUCENE-7014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ahmet Arslan updated LUCENE-7014: --------------------------------- Attachment: LUCENE-7014.patch > 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: 5.5, master, 6.0 > > Attachments: 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org