5 |
|
|
6 |
#include <time.h> |
#include <time.h> |
7 |
|
|
8 |
|
#include "tasks/SpoolTask.h" |
9 |
|
|
10 |
|
|
11 |
TaskManager::TaskManager() |
TaskManager::TaskManager() |
12 |
: _lastExecuted(0) |
: _lastExecuted(0) |
13 |
{ |
{ |
26 |
|
|
27 |
void TaskManager::LoadTasks() |
void TaskManager::LoadTasks() |
28 |
{ |
{ |
29 |
|
static SpoolTask task; |
30 |
|
|
31 |
//print the loaded tasks |
//print the loaded tasks |
32 |
std::map<std::string, Task*>::iterator it; |
std::map<std::string, Task*>::iterator it; |
64 |
} |
} |
65 |
|
|
66 |
|
|
67 |
void TaskManager::ExecuteTasks(IGsmModem& modem) |
void TaskManager::ExecuteTasks(ISmsTransceiver& modem) |
68 |
{ |
{ |
69 |
const int SLEEP_TIME = 10; //wait at least 10 seconds between executions |
const int SLEEP_TIME = 10; //wait at least 10 seconds between executions |
70 |
int now = time(0); |
int now = time(0); |