Skip to content

Commit 8c51a99

Browse files
committed
Adding isRunning method
1 parent 96f37e4 commit 8c51a99

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/ScheduleTable.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ void ScheduleTable::stop()
157157
mState = SCHEDULETABLE_STOPPED;
158158
}
159159

160+
/* Return true if the schedule table is started */
161+
bool ScheduleTable::isRunning() const
162+
{
163+
return (SCHEDULETABLE_STOPPED != mState);
164+
}
165+
160166
/*
161167
* Change the period of the schedule table
162168
* Fail silently if period is lower than 1 or greater than

src/ScheduleTable.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ class ScheduleTable
170170
void start(unsigned int howMuch = 0);
171171
/* Stop the schedule table */
172172
void stop();
173+
/* Return true if the schedule table is started */
174+
bool isRunning() const;
173175
/* Set the period of the schedule table */
174176
void setPeriod(unsigned int period);
175177
/* Remove all the actions from the schedule table */

0 commit comments

Comments
 (0)