| | |
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 |
-xlint add android api applet application applications array automation bank bi binary blackberry bluetooth chat class clear client code codesnippet collections compile compiler component database development dice ebook eclipse equation error event formatingtextintooltipjava fractal freeze functiontesting game gameprogramming givemetehcodez graphics gui health html hyper ide idea image infinite int invokingapacheantprogrammatically j2me java javame javaprojects jetbrains jni jpanel jtable julia learningresources linux main map method mobile myregfun mysql netbeans nonstatic notdisplaying openjavafx parameter pearl php problem program project qt repositories scanner screen scrollbar server set sms sorting spamblocker sql sqlserver storm string superclass swing system thread threads tree variablebinding windows xor






