| | |
Problem in Timer
![]() |
Hi Friends..,
I have some problem in my timer thread.....
the actual problem is... if i start only my application means timer is working fine.....but if i start any other application in my desktop means...problem arising in timer....timer becomes slow in action...
and i have used Sleep range of 1000 in thread
thread.sleep(1000);
but whn i compare with my system time it becomes slow..in result
I have some problem in my timer thread.....
the actual problem is... if i start only my application means timer is working fine.....but if i start any other application in my desktop means...problem arising in timer....timer becomes slow in action...
and i have used Sleep range of 1000 in thread
thread.sleep(1000);
but whn i compare with my system time it becomes slow..in result
If your application gets less CPU cycles it might become more sluggish.
The sleep time is defined as the minimum time the thread will sleep, not an exact time.
If another application eats most of your CPU, the one you're monitoring may not get enough of a timeslice to hit that sleeping thread just after a second, causing it to lag behind.
The sleep time is defined as the minimum time the thread will sleep, not an exact time.
If another application eats most of your CPU, the one you're monitoring may not get enough of a timeslice to hit that sleeping thread just after a second, causing it to lag behind.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
Similar Threads
- Problem with timer (urgent) (Visual Basic 4 / 5 / 6)
- Problem in Timer thread (Java)
- booting problem (Windows NT / 2000 / XP)
Other Threads in the Java Forum
- Previous Thread: J2ME Polish tutorial
- Next Thread: plz help
| Thread Tools | Search this Thread |
911 addball addressbook android api append applet application apps array arrays automation binary bluetooth businessintelligence button card class client code collision component crashcourse css csv database eclipse ee error fractal free ftp game gis givemetehcodez graphics gui html ide image integer integration j2me japplet java javaarraylist javadoc javafx javaprojects jni jpanel julia jvm linked linux list loan machine map method methods migrate mobile netbeans objects oriented output phone physics printf problem program programming project projects radio recursion replaydirector reporting researchinmotion rotatetext scanner se server service set sms software sort sql string swing test textfield threads tree trolltech ubuntu utility windows






