frameRate

v0.1.6
frameRate(fps);

Set the frame rate

Arguments

fpsThe frame rate to set

If frame rate is called without an argument, it will return frame per seconds

x = 0;

function setup()
  createWindow(400, 400);
  frameRate(24);
end

function draw()
  background(51);
  text('fps: ' .. frameRate(), 20, 10);

  circle(x, 200, 32);
  x = x + 1;
end
See frameRate in window.h