VILLASframework / node

Connecting real-time power grid simulation equipment
https://fein-aachen.org/projects/villas-node/
Apache License 2.0
10 stars 5 forks source link

Rt optimizations rebased #811

Open n-eiling opened 1 month ago

n-eiling commented 1 month ago

rebased variant of #567

stv0g commented 1 month ago

@n-eiling Do you mind giving this a review? I am curious about your opinion on these changes.

n-eiling commented 1 month ago

Regarding the timer changes: It looks like it changes many calls to Task to use the default parameter, which currently is Task(int clock = CLOCK_REALTIME);. I would assume we want CLOCK_MONOTONIC though. CLOCK_REALTIME can change during runtime, e.g., because NTP/chronyd updates the time - CLOCK_MONOTONIC will not. Regarding the prefaults: I didn't test them - I assumed you researched how to do this correctly before creating the PR? Otherwise the PR adds a bit of error handling.

stv0g commented 1 month ago

I would assume we want CLOCK_MONOTONIC though.

I agree. Dunno, why I changed this back then.. Maybe I change the default to the monotonic clock as this is usually preferred.

n-eiling commented 1 month ago

ok let me change this to a draft and I'll try to test / improve when I get the time.