[jboss-jira] [JBoss JIRA] (JGRP-1406) Replace System.currentTimeMillis() with System.nanoTime()

Bela Ban (JIRA) jira-events at lists.jboss.org
Fri Feb 10 08:11:49 EST 2012


    [ https://issues.jboss.org/browse/JGRP-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665616#comment-12665616 ] 

Bela Ban commented on JGRP-1406:
--------------------------------

Only replace in time-critical code. For example, MPerf runs for multiple seconds, up to minutes, so there's no use in replcaing currentTimeMillis() with nanoTime() there.

However, TimeScheduler implementations would probably benefit from using nanoTime().
                
> Replace System.currentTimeMillis() with System.nanoTime()
> ---------------------------------------------------------
>
>                 Key: JGRP-1406
>                 URL: https://issues.jboss.org/browse/JGRP-1406
>             Project: JGroups
>          Issue Type: Enhancement
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>            Priority: Minor
>             Fix For: 3.1
>
>
> For short timings, replace currentTimeMillis() with nanoTime(). This might get us better precision. Might need testing on Windows, where nanoTime() is apparently not implemented efficiently...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list