1
0
Fork 0
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:
jules 2014-03-14 17:54:17 +00:00
parent e1f3ce0699
commit c577b04ccc

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);