isCounterRunning() not working?
code-al opened this issue · 5 comments
code-al commented
I'm trying to use this function but it isn't recognized. Help?
inflop commented
Oh yes, it's not implemented yet ;) Try use !isStopped() && !isCounterCompleted()
condition at this moment. Let me know if it helps.
code-al commented
Yes, im currently using isStopped as alternative. Thanks
dbcom commented
Hi!
Great job on the timer.
Would the below code work as a quick and dirty workaround for isCounterRunning?
// Returns true if counter is still running, otherwise returns false.
bool isCounterRunning();
void Countimer::isCounterRunning()
{
// timer is running only if is not completed or not stopped.
if (_isCounterCompleted || _isStopped) return (true);
return (false);
)
inflop commented
@dbcom, try this:
// Returns true if counter is still running, otherwise returns false.
bool Countimer::isCounterRunning() {
// timer is running only if is not completed and not stopped.
return !_isCounterCompleted && !_isStopped;
}
dbcom commented
Thanks!