stephen_blair
YaBB Newbies
Offline
Posts: 4
|
system clock speeds up
Jul 19th, 2005, 12:55pm
Haven't seen this bug posted elsewhere. When I run my programs the system clock (as shown on the taskbar) nearly doubles in speed. You can actually see the seconds ticking away faster and the second hand speeding round. I'm using build 0091 Beta on Windows XP. The clock reverts to normal speed when programs stop executing and syncs up with the internet time periodically. This code does it (but nearly everything else does too):
Orbital sun, earth;
void setup() { size(200, 200, P3D); sun = new Orbital(0, width/2, height/2, 0, 40); earth = new Orbital(50, width/2, height/2, 0, 2); }
void draw() { noStroke(); lights(); directionalLight(128, 128, 128, 200, 200, 0); background(0); sun.update(); earth.update(); }
class Orbital { float a, sp, r, ox, oy, oz, s; Orbital (float rad, float orix, float oriy, float oriz, float sze) { r = rad; ox = orix; oy = oriy; oz = oriz; s = sze; a = random(-360, 360); sp = 3; } void update() { pushMatrix(); translate(ox + r * sin(radians(a)), oy + r * cos(radians(a)), oz + r * cos(radians(a))); sphere(s); if (a > 360 || a < -360) { a = 0; } a += sp; popMatrix(); } }
|