[3780] in java-interest
Re: Odd timing on Turkey Day
daemon@ATHENA.MIT.EDU (Jim.Graham@Eng.Sun.COM)
Mon Nov 27 20:19:59 1995
Date: Mon, 27 Nov 1995 13:32:06 -0800
To: java-interest@java.Eng.Sun.COM, irogers@biggun.com
From: Jim.Graham@Eng.Sun.COM
> This explains quite a bit of the odd behavior I've been experiencing. So
> can I call repaint(1) to force a call within 1 millisecond and thus gain
> tigheter control over the animation?
repaint(ms) only "tries its best" to do the repaint within the specified
time frame. The timeout only controls expected scheduling, it can't force
the repaint to occur at the specified time because there may be other
things going on.
> I'm guessing there is a caveot to this, what would it be?
Typically a separate thread is used to drive the animation and it sleeps
at the approximate frame rate that it wants to achieve while the update
method is robust with respect to missing some frames either due to a
slow processor not being able to keep up or various delays caused by
background processes interfering for short periods of time. The frame
rate you can expect to achieve depends on how complex your animation is
and how fast the platform you are running on.
...jim
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com