LMMS
Loading...
Searching...
No Matches
juce::Timer::TimerThread Class Reference
Inheritance diagram for juce::Timer::TimerThread:
juce::Thread juce::DeletedAtShutdown juce::AsyncUpdater

Classes

struct  TimerCountdown
struct  CallTimersMessage

Public Types

using LockType = CriticalSection

Public Member Functions

 TimerThread ()
 ~TimerThread () override
void run () override
void callTimers ()
void callTimersSynchronously ()

Static Public Member Functions

static void add (Timer *tim) noexcept
static void remove (Timer *tim) noexcept
static void resetCounter (Timer *tim) noexcept

Static Public Attributes

static TimerThreadinstance = nullptr
static LockType lock

Private Member Functions

void addTimer (Timer *t)
void removeTimer (Timer *t)
void resetTimerCounter (Timer *t) noexcept
void shuffleTimerBackInQueue (size_t pos)
void shuffleTimerForwardInQueue (size_t pos)
int getTimeUntilFirstTimer (int numMillisecsElapsed)
void handleAsyncUpdate () override
Private Member Functions inherited from juce::Thread
 Thread (const String &threadName, size_t threadStackSize=0)
virtual ~Thread ()
void startThread ()
void startThread (int priority)
bool stopThread (int timeOutMilliseconds)
bool isThreadRunning () const
void signalThreadShouldExit ()
bool threadShouldExit () const
bool waitForThreadToExit (int timeOutMilliseconds) const
void addListener (Listener *)
void removeListener (Listener *)
bool setPriority (int priority)
void setAffinityMask (uint32 affinityMask)
bool wait (int timeOutMilliseconds) const
void notify () const
ThreadID getThreadId () const noexcept
const StringgetThreadName () const noexcept
Private Member Functions inherited from juce::DeletedAtShutdown
 DeletedAtShutdown ()
virtual ~DeletedAtShutdown ()
Private Member Functions inherited from juce::AsyncUpdater
 AsyncUpdater ()
virtual ~AsyncUpdater ()
void triggerAsyncUpdate ()
void cancelPendingUpdate () noexcept
void handleUpdateNowIfNeeded ()
bool isUpdatePending () const noexcept

Private Attributes

std::vector< TimerCountdowntimers
WaitableEvent callbackArrived

Additional Inherited Members

Private Types inherited from juce::Thread
enum  { realtimeAudioPriority = -1 }
using ThreadID = void*
Static Private Member Functions inherited from juce::Thread
static void launch (std::function< void()> functionToRun)
static bool currentThreadShouldExit ()
static bool setCurrentThreadPriority (int priority)
static void JUCE_CALLTYPE setCurrentThreadAffinityMask (uint32 affinityMask)
static void JUCE_CALLTYPE sleep (int milliseconds)
static void JUCE_CALLTYPE yield ()
static ThreadID JUCE_CALLTYPE getCurrentThreadId ()
static Thread *JUCE_CALLTYPE getCurrentThread ()
static void JUCE_CALLTYPE setCurrentThreadName (const String &newThreadName)
Static Private Member Functions inherited from juce::DeletedAtShutdown
static void deleteAll ()

Member Typedef Documentation

◆ LockType

using juce::Timer::TimerThread::LockType = CriticalSection

Constructor & Destructor Documentation

◆ TimerThread()

juce::Timer::TimerThread::TimerThread ( )
inline

◆ ~TimerThread()

juce::Timer::TimerThread::~TimerThread ( )
inlineoverride

Member Function Documentation

◆ add()

void juce::Timer::TimerThread::add ( Timer * tim)
inlinestaticnoexcept

◆ addTimer()

void juce::Timer::TimerThread::addTimer ( Timer * t)
inlineprivate

◆ callTimers()

void juce::Timer::TimerThread::callTimers ( )
inline

◆ callTimersSynchronously()

void juce::Timer::TimerThread::callTimersSynchronously ( )
inline

◆ getTimeUntilFirstTimer()

int juce::Timer::TimerThread::getTimeUntilFirstTimer ( int numMillisecsElapsed)
inlineprivate

◆ handleAsyncUpdate()

void juce::Timer::TimerThread::handleAsyncUpdate ( )
inlineoverrideprivatevirtual

Called back to do whatever your class needs to do.

This method is called by the message thread at the next convenient time after the triggerAsyncUpdate() method has been called.

Implements juce::AsyncUpdater.

◆ remove()

void juce::Timer::TimerThread::remove ( Timer * tim)
inlinestaticnoexcept

◆ removeTimer()

void juce::Timer::TimerThread::removeTimer ( Timer * t)
inlineprivate

◆ resetCounter()

void juce::Timer::TimerThread::resetCounter ( Timer * tim)
inlinestaticnoexcept

◆ resetTimerCounter()

void juce::Timer::TimerThread::resetTimerCounter ( Timer * t)
inlineprivatenoexcept

◆ run()

void juce::Timer::TimerThread::run ( )
inlineoverridevirtual

Must be implemented to perform the thread's actual code.

Remember that the thread must regularly check the threadShouldExit() method whilst running, and if this returns true it should return from the run() method as soon as possible to avoid being forcibly killed.

See also
threadShouldExit, startThread

Implements juce::Thread.

◆ shuffleTimerBackInQueue()

void juce::Timer::TimerThread::shuffleTimerBackInQueue ( size_t pos)
inlineprivate

◆ shuffleTimerForwardInQueue()

void juce::Timer::TimerThread::shuffleTimerForwardInQueue ( size_t pos)
inlineprivate

Member Data Documentation

◆ callbackArrived

WaitableEvent juce::Timer::TimerThread::callbackArrived
private

◆ instance

Timer::TimerThread * juce::Timer::TimerThread::instance = nullptr
static

◆ lock

Timer::TimerThread::LockType juce::Timer::TimerThread::lock
static

◆ timers

std::vector<TimerCountdown> juce::Timer::TimerThread::timers
private

The documentation for this class was generated from the following file: