![]() |
|
#11
|
|||
|
|||
Yo, what up dizzle,
No there's no built-in way to get the frame-rate reading. Here's a sample script that manually calculates the framerate: Code:
import viz import time viz.go() HISTORY_SIZE = 30 framerate = [] def mytimer(num): framerate.append(time.clock()) if len(framerate) > HISTORY_SIZE: del framerate[0] rate = len(framerate) / (framerate[-1] - framerate[0]) viz.callback(viz.TIMER_EVENT,mytimer) viz.starttimer(0,0.001,viz.FOREVER) |
Thread Tools | |
Display Modes | Rate This Thread |
|
|