JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
task_small.png
CLOSED  Task JPPF-423  -  Replace System.currentTimeMillis() with System.nanoTime() everywhere applicable
Posted Nov 08, 2015 - updated Nov 22, 2015
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Task
  • Status
     
    Closed
  • Assigned to
     lolo4j
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     lolo4j
  • Owned by
    Not owned by anyone
  • Estimated time
    Not estimated
  • Category
    Core
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Targetted for
    icon_milestones.png JPPF 5.2
Issue description
There are still many places in the code where we use System.currentTimeMillis() to measure time intervals. This method is known for its lack of acucracy and should be replaced with a call to nanoTime() wherever possible, as it provides a sub-microsecond accurracy on most, if not all, modern hardware.

This should also be the opportunity to review the parts of the code that rely on waiting for a specified time, i.e. wait(...), sleep(...) and wrapping methods in class ThreadSynchronizaion and others, where there is a potential for blocking threads for a large amount of time and generate deadlock-like situations.

#1
Comment posted by
 lolo4j
Nov 22, 06:14
Implemented in trunk revision 3906