31static const uint64 millisecondsBetweenOscAndJuceEpochs = 2208988800000ULL;
32static const uint64 rawTimeTagRepresentingImmediately = 0x0000000000000001ULL;
45 const uint64 milliseconds = (
uint64)
time.toMilliseconds() + millisecondsBetweenOscAndJuceEpochs;
47 uint64 seconds = milliseconds / 1000;
56 const uint64 seconds = rawTimeTag >> 32;
64 - (
int64) millisecondsBetweenOscAndJuceEpochs;
72 return rawTimeTag == rawTimeTagRepresentingImmediately;
86 void runTest()
override
92 expect (tag.isImmediately());
95 OSCTimeTag tag (3535653);
96 expect (! tag.isImmediately());
100 expect (!
otherTag.isImmediately());
103 expect (!
copyTag.isImmediately());
106 beginTest (
"Conversion to/from JUCE Time");
110 OSCTimeTag tag (time);
111 expect (! tag.isImmediately());
115 Time
time = tag.toTime();
Holds an absolute date and time.
static int64 currentTimeMillis() noexcept
Returns the current system time.
static Time JUCE_CALLTYPE getCurrentTime() noexcept
Returns a Time object that is set to the current system time.
This is a base class for classes that perform a unit test.
unsigned long long uint64
A platform-independent 64-bit unsigned integer type.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
unsigned int uint32
A platform-independent 32-bit unsigned integer type.
int roundToInt(const FloatType value) noexcept
Fast floating-point-to-integer conversion.
long long int64
A platform-independent 64-bit integer type.