mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Removed some Timer debugging code that wasn't really very useful.
This commit is contained in:
parent
e1f3ce0699
commit
c577b04ccc
1 changed files with 0 additions and 26 deletions
|
|
@ -295,20 +295,12 @@ Timer::TimerThread* Timer::TimerThread::instance = nullptr;
|
|||
Timer::TimerThread::LockType Timer::TimerThread::lock;
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_DEBUG
|
||||
static SortedSet <Timer*> activeTimers;
|
||||
#endif
|
||||
|
||||
Timer::Timer() noexcept
|
||||
: countdownMs (0),
|
||||
periodMs (0),
|
||||
previous (nullptr),
|
||||
next (nullptr)
|
||||
{
|
||||
#if JUCE_DEBUG
|
||||
const TimerThread::LockType::ScopedLockType sl (TimerThread::lock);
|
||||
activeTimers.add (this);
|
||||
#endif
|
||||
}
|
||||
|
||||
Timer::Timer (const Timer&) noexcept
|
||||
|
|
@ -317,30 +309,17 @@ Timer::Timer (const Timer&) noexcept
|
|||
previous (nullptr),
|
||||
next (nullptr)
|
||||
{
|
||||
#if JUCE_DEBUG
|
||||
const TimerThread::LockType::ScopedLockType sl (TimerThread::lock);
|
||||
activeTimers.add (this);
|
||||
#endif
|
||||
}
|
||||
|
||||
Timer::~Timer()
|
||||
{
|
||||
stopTimer();
|
||||
|
||||
#if JUCE_DEBUG
|
||||
activeTimers.removeValue (this);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Timer::startTimer (const int interval) noexcept
|
||||
{
|
||||
const TimerThread::LockType::ScopedLockType sl (TimerThread::lock);
|
||||
|
||||
#if JUCE_DEBUG
|
||||
// this isn't a valid object! Your timer might be a dangling pointer or something..
|
||||
jassert (activeTimers.contains (this));
|
||||
#endif
|
||||
|
||||
if (periodMs == 0)
|
||||
{
|
||||
countdownMs = interval;
|
||||
|
|
@ -357,11 +336,6 @@ void Timer::stopTimer() noexcept
|
|||
{
|
||||
const TimerThread::LockType::ScopedLockType sl (TimerThread::lock);
|
||||
|
||||
#if JUCE_DEBUG
|
||||
// this isn't a valid object! Your timer might be a dangling pointer or something..
|
||||
jassert (activeTimers.contains (this));
|
||||
#endif
|
||||
|
||||
if (periodMs > 0)
|
||||
{
|
||||
TimerThread::remove (this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue