UPS
This function returns the application updates per second.
Syntax
Returns
Returns the updates per second value. This is normally synonymous to frames per second (FPS).
Example
--Create a window
window = Window:Create()
context = Context:Create(window)
world = World:Create()
local camera = Camera:Create()
camera:Move(0,0,-3)
local light = DirectionalLight:Create()
light:SetRotation(35,35,0)
model = Model:Box()
model:SetColor(0.0,0.0,1.0)
while true do
if window:Closed() or window:KeyHit(Key.Escape) then return false end
model:Turn(0,Time:GetSpeed(),0)
Time:Update()
world:Update()
world:Render()
context:SetBlendMode(Blend.Alpha)
context:DrawText("UPS: "..Time:UPS(),2,2)
context:Sync()
return true
end