OpenShot Audio Library | OpenShotAudio
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
juce_RelativeTime.h
1
/*
2
==============================================================================
3
4
This file is part of the JUCE library.
5
Copyright (c) 2022 - Raw Material Software Limited
6
7
JUCE is an open source library subject to commercial or open-source
8
licensing.
9
10
The code included in this file is provided under the terms of the ISC license
11
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12
To use, copy, modify, and/or distribute this software for any purpose with or
13
without fee is hereby granted provided that the above copyright notice and
14
this permission notice appear in all copies.
15
16
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18
DISCLAIMED.
19
20
==============================================================================
21
*/
22
23
namespace
juce
24
{
25
26
//==============================================================================
36
class
JUCE_API
RelativeTime
37
{
38
public
:
39
//==============================================================================
45
explicit
RelativeTime
(
double
seconds
= 0.0)
noexcept
;
46
48
RelativeTime
(
const
RelativeTime
& other)
noexcept
;
49
51
RelativeTime
& operator= (
const
RelativeTime
& other)
noexcept
;
52
54
~RelativeTime
()
noexcept
;
55
56
//==============================================================================
60
static
RelativeTime
milliseconds
(
int
milliseconds
)
noexcept
;
61
65
static
RelativeTime
milliseconds
(int64
milliseconds
)
noexcept
;
66
70
static
RelativeTime
seconds
(
double
seconds
)
noexcept
;
71
75
static
RelativeTime
minutes
(
double
numberOfMinutes)
noexcept
;
76
80
static
RelativeTime
hours
(
double
numberOfHours)
noexcept
;
81
85
static
RelativeTime
days
(
double
numberOfDays)
noexcept
;
86
90
static
RelativeTime
weeks
(
double
numberOfWeeks)
noexcept
;
91
92
//==============================================================================
96
int64
inMilliseconds
()
const
noexcept
;
97
101
double
inSeconds
() const noexcept {
return
numSeconds; }
102
106
double
inMinutes() const noexcept;
107
111
double
inHours() const noexcept;
112
116
double
inDays() const noexcept;
117
121
double
inWeeks() const noexcept;
122
138
String
getDescription (const
String
& returnValueForZeroTime =
"0"
) const;
139
140
//==============================================================================
146
String
getApproximateDescription() const;
147
148
//==============================================================================
150
RelativeTime
operator+= (
RelativeTime
timeToAdd) noexcept;
152
RelativeTime
operator-= (
RelativeTime
timeToSubtract) noexcept;
153
155
RelativeTime
operator+= (
double
secondsToAdd) noexcept;
157
RelativeTime
operator-= (
double
secondsToSubtract) noexcept;
158
159
private:
160
//==============================================================================
161
double
numSeconds;
162
};
163
164
//==============================================================================
166
JUCE_API
bool
JUCE_CALLTYPE operator== (
RelativeTime
t1,
RelativeTime
t2) noexcept;
168
JUCE_API
bool
JUCE_CALLTYPE operator!= (
RelativeTime
t1,
RelativeTime
t2) noexcept;
170
JUCE_API
bool
JUCE_CALLTYPE operator> (
RelativeTime
t1,
RelativeTime
t2) noexcept;
172
JUCE_API
bool
JUCE_CALLTYPE operator< (
RelativeTime
t1,
RelativeTime
t2) noexcept;
174
JUCE_API
bool
JUCE_CALLTYPE operator>= (
RelativeTime
t1,
RelativeTime
t2) noexcept;
176
JUCE_API
bool
JUCE_CALLTYPE operator<= (
RelativeTime
t1,
RelativeTime
t2) noexcept;
177
178
//==============================================================================
180
JUCE_API
RelativeTime
JUCE_CALLTYPE operator+ (
RelativeTime
t1,
RelativeTime
t2) noexcept;
182
JUCE_API
RelativeTime
JUCE_CALLTYPE operator- (
RelativeTime
t1,
RelativeTime
t2) noexcept;
183
184
}
// namespace juce
juce::RelativeTime
Definition
juce_RelativeTime.h:37
juce::RelativeTime::inMilliseconds
int64 inMilliseconds() const noexcept
Definition
juce_RelativeTime.cpp:40
juce::RelativeTime::minutes
static RelativeTime minutes(double numberOfMinutes) noexcept
Definition
juce_RelativeTime.cpp:34
juce::RelativeTime::milliseconds
static RelativeTime milliseconds(int milliseconds) noexcept
Definition
juce_RelativeTime.cpp:31
juce::RelativeTime::inSeconds
double inSeconds() const noexcept
Definition
juce_RelativeTime.h:101
juce::RelativeTime::hours
static RelativeTime hours(double numberOfHours) noexcept
Definition
juce_RelativeTime.cpp:35
juce::RelativeTime::days
static RelativeTime days(double numberOfDays) noexcept
Definition
juce_RelativeTime.cpp:36
juce::RelativeTime::weeks
static RelativeTime weeks(double numberOfWeeks) noexcept
Definition
juce_RelativeTime.cpp:37
juce::RelativeTime::seconds
static RelativeTime seconds(double seconds) noexcept
Definition
juce_RelativeTime.cpp:33
juce::RelativeTime::RelativeTime
RelativeTime(double seconds=0.0) noexcept
Definition
juce_RelativeTime.cpp:26
juce::String
Definition
juce_String.h:53
libopenshot-audio
JuceLibraryCode
modules
juce_core
time
juce_RelativeTime.h
Generated by
1.18.0