diff options
Diffstat (limited to 'lib/Task.cc')
-rw-r--r-- | lib/Task.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Task.cc b/lib/Task.cc index 338eaba..fd1bf3f 100644 --- a/lib/Task.cc +++ b/lib/Task.cc @@ -1,9 +1,15 @@ +#include <sys/time.h> #include <iostream.h> +#include "TaskMan.h" #include "Task.h" #include "String.h" -Task::Task() : state(TASK_ON_HOLD), suspended(false) {} -Task::~Task() {} +Task::Task() : state(TASK_ON_HOLD), suspended(false) { + TaskMan::AddTask(this); +} +Task::~Task() { + TaskMan::RemoveTask(this); +} int Task::Do() throw (GeneralException) { return TASK_ON_HOLD; @@ -55,6 +61,6 @@ void Task::WaitFor(pid_t p) { w4pr.push_back(p); } -void Task::WaitFor(struct timeval t) { +void Task::WaitFor(timeval t) { w4to.push_back(t); } |