manager: rework the timestamps logic, so that they are an enum-index array
This makes things quite a bit more systematic I think, as we can systematically operate on all timestamps, for example for the purpose of serialization/deserialization. This rework doesn't necessarily make things shorter in the individual lines, but it does reduce the line count a bit. (This is useful particularly when we want to add additional timestamps, for example to solve #7023)
This commit is contained in:
+1
-1
@@ -419,7 +419,7 @@ static void timer_enter_waiting(Timer *t, bool initial) {
|
||||
* our own startup. */
|
||||
/* fall through */
|
||||
case TIMER_STARTUP:
|
||||
base = UNIT(t)->manager->userspace_timestamp.monotonic;
|
||||
base = UNIT(t)->manager->timestamps[MANAGER_TIMESTAMP_USERSPACE].monotonic;
|
||||
break;
|
||||
|
||||
case TIMER_UNIT_ACTIVE:
|
||||
|
||||
Reference in New Issue
Block a user