cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
var.video_threaded.FPS Class Reference

Public Member Functions

def __init__ (self)
 
def start (self)
 
def stop (self)
 
def update (self)
 
def elapsed (self)
 
def fps (self)
 

Detailed Description

Definition at line 66 of file video_threaded.py.

Constructor & Destructor Documentation

◆ __init__()

def var.video_threaded.FPS.__init__ (   self)

Definition at line 67 of file video_threaded.py.

67  def __init__(self):
68  # store the start time, end time, and total number of frames
69  # that were examined between the start and end intervals
70  self._start = None
71  self._end = None
72  self._numFrames = 0

Member Function Documentation

◆ elapsed()

def var.video_threaded.FPS.elapsed (   self)

Definition at line 84 of file video_threaded.py.

84  def elapsed(self):
85  # return the total number of seconds between the start and
86  # end interval
87  return (self._end - self._start).total_seconds()
Here is the caller graph for this function:

◆ fps()

def var.video_threaded.FPS.fps (   self)

Definition at line 88 of file video_threaded.py.

88  def fps(self):
89  # compute the (approximate) frames per second
90  return self._numFrames / self.elapsed()
91 
92 
93 
94 
Here is the call graph for this function:

◆ start()

def var.video_threaded.FPS.start (   self)

Definition at line 73 of file video_threaded.py.

73  def start(self):
74  # start the timer
75  self._start = datetime.datetime.now()
76  return self

◆ stop()

def var.video_threaded.FPS.stop (   self)

Definition at line 77 of file video_threaded.py.

77  def stop(self):
78  # stop the timer
79  self._end = datetime.datetime.now()

◆ update()

def var.video_threaded.FPS.update (   self)

Definition at line 80 of file video_threaded.py.

80  def update(self):
81  # increment the total number of frames examined during the
82  # start and end intervals
83  self._numFrames += 1

The documentation for this class was generated from the following file: