[Main page] [Overview]     /std /living /add_task

SYNOPSIS
void add_task( struct Task task)

FILE
/std/living/tasks.h

DESCRIPTION
Makes this living perform a certain task which fatigue-points cost "fp" and
the specified duration in seconds. If "flag" is TASK_CONTINUOUS, the
will be executed over and over. Closure "start" will be called at the
begin of each duration, and closure "end" at the end. Please note, that
if a task is cancelled somehow, "end" might never be called at all!
"args" will be passed as arguments to the closure. The first argument to
the closure will always be a flag (true or false) which says, if the
task has already be run before (in case it was a continuous task)