diff options
author | Pixel <Pixel> | 2001-11-14 16:59:02 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-11-14 16:59:02 +0000 |
commit | aa92df3c58daefb994da555fb45f2e3ee55f38d5 (patch) | |
tree | 6105f0ced059af0fceb10a29f318d0c13c83d051 /lib/Task.cc | |
parent | 9235fbc2a736da2c68eb2dc0a3c1007b4a202d5e (diff) |
Latest and various changes
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); } |