function redrawHelper() {
      var sec = (Date.now() - timeSinceLastFPS) / 1000;
      framesSinceLastFPS++;
      var fps = framesSinceLastFPS / sec;

      // recalculate FPS every half second for better accuracy.
      if (sec > 0.5) {
        timeSinceLastFPS = Date.now();
        framesSinceLastFPS = 0;
        p.__frameRate = fps;
      }

      p.frameCount++;
    }
/**
    * Executes the code within draw() one time. This functions allows the program to update
    * the display window only when necessary, for example when an event registered by
    * mousePressed() or keyPressed() occurs.
    * In structuring a program, it only makes sense to call redraw() within events such as
    * mousePressed(). This is because redraw() does not run draw() immediately (it only sets
    * a flag that indicates an update is needed).
    * Calling redraw() within draw() has no effect because draw() is continuously called anyway.
    *
    * @returns none
    *
    * @see noLoop
    * @see loop
    */
Executes the code within draw() one time. This functions allows the program to update
the display window only when necessary, for example when an event registered by
mousePressed() or keyPressed() occurs.
In structuring a program, it only makes sense to call redraw() within events such as
mousePressed(). This is because redraw() does not run draw() immediately (it only sets
a flag that indicates an update is needed).
Calling redraw() within draw() has no effect because draw() is continuously called anyway.

@returns none

@see noLoop
@see loop
Executes the code within draw () one time . This functions allows the program to update the display window only when necessary for example when an event registered by mousePressed () or keyPressed () occurs . In structuring a program it only makes sense to call redraw () within events such as mousePressed () . This is because redraw () does not run draw () immediately ( it only sets a flag that indicates an update is needed ) . Calling redraw () within draw () has no effect because draw () is continuously called anyway . @returns none @see noLoop @see loop
function redrawHelper() {
      var sec = (Date.now() - timeSinceLastFPS) / 1000;
      framesSinceLastFPS++;
      var fps = framesSinceLastFPS / sec;
      if (sec > 0.5) {
        timeSinceLastFPS = Date.now();
        framesSinceLastFPS = 0;
        p.__frameRate = fps;
      }
      p.frameCount++;
    }
function redrawHelper ( ) { var sec = ( Date . now ( ) - timeSinceLastFPS ) / 1000 ; framesSinceLastFPS ++ ; var fps = framesSinceLastFPS / sec ; if ( sec > 0.5 ) { timeSinceLastFPS = Date . now ( ) ; framesSinceLastFPS = 0 ; p . __frameRate = fps ; } p . frameCount ++ ; }
Executes the code within draw() one time.
Executes the code within draw () one time .
// recalculate FPS every half second for better accuracy.