1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fix: Default clock for tasks to be monotonic

Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
This commit is contained in:
Steffen Vogel 2024-10-31 12:33:46 +01:00 committed by Steffen Vogel
parent a96ba9b9d8
commit 9bcb03d06c
2 changed files with 5 additions and 5 deletions

View file

@ -49,14 +49,14 @@ struct Task {
#endif
// Create a new task with the given rate.
Task(int clock = CLOCK_REALTIME);
Task(int clock = CLOCK_MONOTONIC);
~Task();
// Wait until task elapsed
//
// @retval 0 An error occured. Maybe the task was stopped.
// @retval >0 The nummer of runs this task already fired.
// @retval 0 An error occurred. Maybe the task was stopped.
// @retval >0 The number of runs this task already fired.
uint64_t wait();
void setNext(const struct timespec *next);

View file

@ -93,8 +93,8 @@ public:
};
TestRTT(const uuid_t &id = {}, const std::string &name = "")
: Node(id, name), task(CLOCK_MONOTONIC), formatter(nullptr),
stream(nullptr), shutdown(false) {}
: Node(id, name), task(), formatter(nullptr), stream(nullptr),
shutdown(false) {}
virtual ~TestRTT(){};