I just faced a strange issue; As I can get it the screen capturing code takes not-fixed time:
startTime = System.currentTimeMillis();
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println(this.getId()+" A: TIME TAKEN BETWEEN SCREENSHOTS: "+totalTime);
java.awt.image.BufferedImage image = new java.awt.Robot().createScreenCapture(new java.awt.Rectangle(250,150,500,500));
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println(this.getId()+" B: TIME TAKEN BETWEEN SCREENSHOTS: "+totalTime);
which is quite strange cause sometimes it is 108mls and next time it is lets say 480mls :( So its pretty hard to figure out the screenshot algorithm :S
So my question is... how to find out what time a screenshot will take or how to make screenshot time fixable (limited) in 0.5sec only?
p.s.
jre 1.7
jdk 1.7
OS: linux
Thanks