CVBpy 14.0
RateCounter Class Reference

Frame rate measurement counter with selectable averaging window. More...

Inherits object.

Public Member Functions

int maximum_window_size ()
 Maximum selectable averaging window size. More...
 
int minimum_window_size ()
 Minimal selectable averaging window size. More...
 
None reset (self)
 Erase all measurements so far.
 
None step (self)
 Reading step (first reading step will not yield a measurement result, but define the starting point).
 

Properties

 average_time_span = property
 int: Average time span between two steps or since the creation of the counter or the most recent reset.
 
 mode = property
 int: The stop watch mode used internally (see cvb.StopWatchMode).
 
 num_steps = property
 int: Number of steps called since construction or since last reset.
 
 rate = property
 float: Returns the rate (1 / s) at which the steps occurred.
 
 window_size = property
 int: Gets or sets the currently used averaging window size.
 

Detailed Description

Frame rate measurement counter with selectable averaging window.

By default this class creates a rate counter for multi-CPU architectures with a window of 25.

Parameters

window_size : int Averaging window (that is the number of measurements to be averaged over).

mode : int Mode to use (see cvb.StopWatchMode).

Member Function Documentation

◆ maximum_window_size()

int maximum_window_size ( )

Maximum selectable averaging window size.

Trying to select a larger window will result in an exception.

Returns

int Maximum window.

◆ minimum_window_size()

int minimum_window_size ( )

Minimal selectable averaging window size.

Trying to select a smaller window will result in an exception.

Returns

int Minimal window.