Skip to content
ExamplesOpen editor ↗

lebeloLeLeBeilweng

→ getTargetFrameRate()

Returns the frame rate that was asked for, not the one being achieved.

lebeloLeLeBeilweng()

If you have said nothing, it returns 60 — the default. If you have called lebeloLaDikgato(24), it returns 24, whether or not the computer can keep up.

That is the only difference between it and lebeloLaDikgato(): one speaks about what was asked for, the other about what is happening. When they disagree, your sketch is doing too much.

The name means the speed that has been set — set by you.

What was asked for and what is happening, side by side
tiro setaLoeto() {
  thalaKanefase(400, 200);
  lebeloLaDikgato(30);
  tlhalosa('Mela e mebedi ya mokwalo e e bapisang lebelo le le kopilweng le le le diragalang.');
}
tiro tshwantsha() {
  bokamorago(30, 34, 44);
  tlatsaMmala(240);
  bogoloJwaMokwalo(20);
  mofutatlhaka('monospace');

  thalaMokwalo('e kopilwe:   ' + lebeloLeLeBeilweng(), 30, 80);
  thalaMokwalo('e diragala: ' + atametsa(lebeloLaDikgato()), 30, 130);
}

lebeloLaDikgato, paloYaDikgato, nakoYaKgato