openshot-audio
0.1.4
|
#include <juce_RelativeTime.h>
Public Member Functions | |
RelativeTime (double seconds=0.0) noexcept | |
RelativeTime (const RelativeTime &other) noexcept | |
RelativeTime & | operator= (const RelativeTime &other) noexcept |
~RelativeTime () noexcept | |
int64 | inMilliseconds () const noexcept |
double | inSeconds () const noexcept |
double | inMinutes () const noexcept |
double | inHours () const noexcept |
double | inDays () const noexcept |
double | inWeeks () const noexcept |
String | getDescription (const String &returnValueForZeroTime="0") const |
RelativeTime | operator+= (RelativeTime timeToAdd) noexcept |
RelativeTime | operator-= (RelativeTime timeToSubtract) noexcept |
RelativeTime | operator+= (double secondsToAdd) noexcept |
RelativeTime | operator-= (double secondsToSubtract) noexcept |
Static Public Member Functions | |
static RelativeTime | milliseconds (int milliseconds) noexcept |
static RelativeTime | milliseconds (int64 milliseconds) noexcept |
static RelativeTime | seconds (double seconds) noexcept |
static RelativeTime | minutes (double numberOfMinutes) noexcept |
static RelativeTime | hours (double numberOfHours) noexcept |
static RelativeTime | days (double numberOfDays) noexcept |
static RelativeTime | weeks (double numberOfWeeks) noexcept |
A relative measure of time.
The time is stored as a number of seconds, at double-precision floating point accuracy, and may be positive or negative.
If you need an absolute time, (i.e. a date + time), see the Time class.
|
explicitnoexcept |
Creates a RelativeTime.
seconds | the number of seconds, which may be +ve or -ve. |
|
noexcept |
Copies another relative time.
|
noexcept |
Destructor.
|
staticnoexcept |
Creates a new RelativeTime object representing a number of days.
Returns a readable textual description of the time.
The exact format of the string returned will depend on the magnitude of the time - e.g.
"1 min 4 secs", "1 hr 45 mins", "2 weeks 5 days", "140 ms"
so that only the two most significant units are printed.
The returnValueForZeroTime value is the result that is returned if the length is zero. Depending on your application you might want to use this to return something more relevant like "empty" or "0 secs", etc.
|
staticnoexcept |
Creates a new RelativeTime object representing a number of hours.
|
noexcept |
Returns the number of days this time represents.
|
noexcept |
Returns the number of hours this time represents.
|
noexcept |
|
noexcept |
Returns the number of minutes this time represents.
|
inlinenoexcept |
Returns the number of seconds this time represents.
|
noexcept |
Returns the number of weeks this time represents.
|
staticnoexcept |
|
staticnoexcept |
|
staticnoexcept |
Creates a new RelativeTime object representing a number of minutes.
|
noexcept |
Adds another RelativeTime to this one.
|
noexcept |
Adds a number of seconds to this time.
|
noexcept |
Subtracts another RelativeTime from this one.
|
noexcept |
Subtracts a number of seconds from this time.
|
noexcept |
Copies another relative time.
|
staticnoexcept |
Creates a new RelativeTime object representing a number of seconds.
|
staticnoexcept |
Creates a new RelativeTime object representing a number of weeks.