An OSC time tag. More...
#include <juce_OSCTimeTag.h>
Public Member Functions | |
OSCTimeTag () noexcept | |
Default constructor. More... | |
OSCTimeTag (uint64 rawTimeTag) noexcept | |
Constructs an OSCTimeTag object from a raw binary OSC time tag. More... | |
OSCTimeTag (Time time) noexcept | |
Constructs an OSCTimeTag object from a juce::Time object. More... | |
uint64 | getRawTimeTag () const noexcept |
Returns the raw binary OSC time tag representation. More... | |
bool | isImmediately () const noexcept |
Returns true if the OSCTimeTag object has the special value representing "immedately". More... | |
Time | toTime () const noexcept |
Returns a juce::Time object representing the same time as the OSCTimeTag. More... | |
Static Public Attributes | |
static const OSCTimeTag | immediately |
The special value representing "immediately". More... | |
Private Attributes | |
uint64 | rawTimeTag |
An OSC time tag.
OSC time tags are part of OSCBundle objects.
In accordance with the OSC 1.0 specification, the internal timestamp stored in OSCTimeTag uses the same binary format as NTP timestamps. The representation is by a 64 bit fixed point number. The first 32 bits specify the number of seconds since midnight on January 1, 1900, and the last 32 bits specify fractional parts of a second to a precision of about 200 picoseconds.
The time tag value consisting of 63 zero bits followed by a one in the least significant bit is a special case meaning "immediately".
For a more user-friendly time format, convert OSCTimeTag to a juce::Time object using toTime().
{OSC}
|
noexcept |
Default constructor.
Constructs an OSCTimeTag object with the special value representing "immediately".
|
noexcept |
Constructs an OSCTimeTag object from a raw binary OSC time tag.
|
noexcept |
Constructs an OSCTimeTag object from a juce::Time object.
|
inlinenoexcept |
Returns the raw binary OSC time tag representation.
|
noexcept |
Returns true if the OSCTimeTag object has the special value representing "immedately".
|
noexcept |
Returns a juce::Time object representing the same time as the OSCTimeTag.
If the OSCTimeTag has the special value representing "immediately", the resulting juce::Time object will represent an arbitrary point of time (but guaranteed to be in the past), since juce::Time does not have such a special value.
|
static |
The special value representing "immediately".
|
private |