• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ScheduledThreadPoolExecutor running 15 milliseconds late only outside of IDE?

 
Nathan deNoyelles
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone I hope someone can help me with this problem. I've been creating countless test programs and researching non stop but can't seem to find an answer.

All I'm doing is creating a ScheduledThreadPoolExecutor and scheduling it at a fixed rate of 3 milliseconds. The problem is the rate at which it executes isn't consistent. It executes for awhile at 5 milliseconds and then jumps to random spikes of 15 - 20 milliseconds and just goes crazy trying to catch up.

The problem doesn't occur inside an IDE and only occurs outside the IDE running from the command line or from a Jar. Strange huh... I created a simple test case below that's easy to compile. If you want too see the problem make sure to run it outside of an IDE through the command line.

Thank You for your help!

I'm using:
Java 7 Update 5
Windows 7
IntelliJ IDE

Been tested using:
Java 7
Windows 7, Windows 8
NetBeans IDE, IntelliJ IDE



Variation of the question posted here:
http://stackoverflow.com/questions/11836351/java-scheduledthreadpoolexecutor-running-15-milliseconds-late-inconsistent-tim
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic