X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-timer.cpp;h=f46dacd3c055febea9949b5597fd27edf9953e97;hb=fbb1f2f599b2fc1a54b327039ce6111f4b4ba4cf;hp=2f1ce14ab3032c492b1529101ae577d550a6af0f;hpb=8ad943a28e16767f5fe2fc92d18b38f8808bdc99;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp index 2f1ce14..f46dacd 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2016 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ class Timer; typedef IntrusivePtr TimerPtr; Dali::Timer::TimerSignalType gTickSignal; +int gTimerCount = 0; /** * Implementation of the timer @@ -98,10 +99,12 @@ TimerPtr Timer::New( unsigned int milliSec ) Timer::Timer( unsigned int milliSec ) : mInterval( milliSec ) { + ++gTimerCount; } Timer::~Timer() { + --gTimerCount; } void Timer::Start() @@ -141,7 +144,11 @@ Dali::Timer::TimerSignalType& Timer::TickSignal() void Timer::MockEmitSignal() { - gTickSignal.Emit(); + if( gTimerCount > 1 ) + { + // Only emit the signal if we have more than just the timer created in the test function + gTickSignal.Emit(); + } }