Package nflvid :: Class PlayTime
[frames] | no frames]

Class PlayTime

source code

object --+
         |
        PlayTime

Represents a footage time point, in the format HH:MM:SS:MMM where MMM can be either 2 or 3 digits.

Instance Methods
 
__init__(self, point=None, seconds=None)
Construct a PlayTime object given a point in time in the format HH:MM:SS:MMM where MMM can be either 2 or 3 digits.
source code
 
add_seconds(self, seconds)
Returns a new PlayTime with seconds (int or float) added to self.
source code
 
seconds(self)
Returns this time point rounded to the nearest second.
source code
 
fractional(self)
Returns this time point as fractional seconds based on milliseconds.
source code
 
__cmp__(self, other) source code
 
__sub__(self, other)
Returns the difference rounded to nearest second between two time points.
source code
 
__str__(self)
str(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, point=None, seconds=None)
(Constructor)

source code 

Construct a PlayTime object given a point in time in the format HH:MM:SS:MMM where MMM can be either 2 or 3 digits.

Alternatively, seconds can be provided (which may be a float).

Overrides: object.__init__

__sub__(self, other)
(Subtraction operator)

source code 

Returns the difference rounded to nearest second between two time points. The 'other' time point must take place before the current time point.

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)