Browse Source

Removed some Timer debugging code that wasn't really very useful.

tags/2021-05-28
jules 12 years ago
parent
commit
c577b04ccc
1 changed files with 0 additions and 26 deletions
  1. +0
    -26
      modules/juce_events/timers/juce_Timer.cpp

+ 0
- 26
modules/juce_events/timers/juce_Timer.cpp View File

@@ -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…
Cancel
Save