Time data structure.
More...
#include <pyfbsdk_generated.h>
|
| FBTime (long pTime=0) |
|
| FBTime (int pHour, int pMinute, int pSecond=0, int pFrame=0, int pField=0, FBTimeMode pTimeMode=kFBTimeModeDefault) |
| Constructor.
|
|
long | Get () |
| Get time value (long)
|
|
long | Get () |
| Get time value (long)
|
|
long | GetFrame (FBTimeMode pTimeMode=kFBTimeModeDefault) |
| Get the frame count.
|
|
long | GetMilliSeconds () |
| Get milliseconds for time.
|
|
float | GetSecondDouble () |
| Get seconds as double.
|
|
str | GetTimeString (FBTimeMode pMode=kFBTimeModeDefault, ETimeFormats pFormat=eDefaultFormat) |
| Get time as a string.
|
|
bool | IsExactlyOnFrame (FBTimeMode pTimeMode=kFBTimeModeDefault) |
| Is the time falling exactly on a frame?
|
|
| Set (long pTime) |
| Set time value from a long.
|
|
| SetFrame (long pFrames, FBTimeMode pTimeMode=kFBTimeModeDefault) |
| Set time in frame format.
|
|
| SetMilliSeconds (long pMilliSeconds) |
| Set milliseconds time.
|
|
| SetSecondDouble (float pTime) |
| Set seconds from double.
|
|
| SetTime (int pHour, int pMinute=0, int pSecond=0, int pFrame=0, int pField=0, FBTimeMode pTimeMode=kFBTimeModeDefault) |
| Set time (from separate values)
|
|
| SetTimeString (str pTime) |
| Set time from string.
|
|
◆ FBTime() [1/2]
◆ FBTime() [2/2]
Constructor.
- Parameters
-
pHour | Hour value. |
pMinute | Minute value. |
pSecond | Second value. |
pFrame | Frame value. |
pField | Field value. |
pTimeMode | Time mode(default=kFBTimeModeDefault). |
◆ Get() [1/2]
Get time value (long)
- Returns
- Time value as long.
◆ Get() [2/2]
Get time value (long)
- Returns
- Time value as long.
◆ GetFrame()
Get the frame count.
With this function, it is possible to obtain the cumulative and local frame counts.
- Parameters
-
pTimeMode | Time mode to get the constant (default is kFBTimeModeDefault). |
- Returns
- Frames per second constant for the specified time mode.
◆ GetMilliSeconds()
Get milliseconds for time.
- Returns
- MilliSeconds value.
◆ GetSecondDouble()
float GetSecondDouble |
( |
| ) |
|
Get seconds as double.
- Returns
- Seconds in double form.
◆ GetTimeString()
str GetTimeString |
( |
FBTimeMode |
pMode = kFBTimeModeDefault , |
|
|
ETimeFormats |
pFormat = eDefaultFormat |
|
) |
| |
Get time as a string.
- Parameters
-
pMode | Time mode (default=kFBTimeModeDefault) to use (call FBSystem().GetTransportFps() to the the current UI displayed mode). |
pFormat | Format to use for the returned string(default=FBTime::eDefaultFormat). |
- Returns
- String value of time.
◆ IsExactlyOnFrame()
Is the time falling exactly on a frame?
# The following Python snippet shows a scenario where calling IsExactlyOnFrame might be useful.
# Frame 1054
myTime =
FBTime( 0, 0, 0, 1054 )
# Frame 1054 with a very small offset
myTime2.
Set( myTime.
Get() + 10 )
print( "myTime as frame :", myTime.
GetFrame() )
print( "myTime2 as frame :", myTime2.
GetFrame() )
Time data structure.
Definition: pyfbsdk_generated.h:19596
long Get()
Get time value (long)
str GetTimeString(FBTimeMode pMode=kFBTimeModeDefault, ETimeFormats pFormat=eDefaultFormat)
Get time as a string.
long GetFrame(FBTimeMode pTimeMode=kFBTimeModeDefault)
Get the frame count.
Set(long pTime)
Set time value from a long.
bool IsExactlyOnFrame(FBTimeMode pTimeMode=kFBTimeModeDefault)
Is the time falling exactly on a frame?
Different time modes available.
Definition: pyfbsdk_generated.h:19808
- Parameters
-
pTimeMode | Time mode to get time as. |
- Returns
- True if the time falls exactly on a frame, false otherwise.
◆ Set()
Set time value from a long.
- Parameters
-
◆ SetFrame()
Set time in frame format.
- Parameters
-
pFrames | The number of frames. |
pTimeMode | The time mode identifier which will dictate the extraction algorithm. |
◆ SetMilliSeconds()
SetMilliSeconds |
( |
long |
pMilliSeconds | ) |
|
Set milliseconds time.
- Parameters
-
pMilliSeconds | MilliSeconds value. |
◆ SetSecondDouble()
SetSecondDouble |
( |
float |
pTime | ) |
|
Set seconds from double.
- Parameters
-
pTime | Time to set seconds from. |
◆ SetTime()
SetTime |
( |
int |
pHour, |
|
|
int |
pMinute = 0 , |
|
|
int |
pSecond = 0 , |
|
|
int |
pFrame = 0 , |
|
|
int |
pField = 0 , |
|
|
FBTimeMode |
pTimeMode = kFBTimeModeDefault |
|
) |
| |
Set time (from separate values)
- Parameters
-
pHour | Hour value. |
pMinute | Minute value(default=0). |
pSecond | Second value(default=0). |
pFrame | Frame value(default=0). |
pField | Field value(default=0). |
pTimeMode | Time mode to get time as(default=kFBTimeModeDefault). |
◆ SetTimeString()
SetTimeString |
( |
str |
pTime | ) |
|
Set time from string.
- Parameters
-
pTime | String to set time from. |
◆ Infinity
Time constant: Infinity, the largest time value.
◆ MinusInfinity
Time constant: Minus Infinity, the lowest negative time value.
◆ OneHour
◆ OneMinute
Time constant: One Minute.
◆ OneSecond
Time constant: One Second.
◆ Zero