The source project of this merge request has been removed.
avoid rounding errors and overflows when substracting timespecs
The current Unix time will cause overflows if multiplied with 1000, which could lead to rounding errors afterwards. Do the substractions first so all numbers stay small enough to fit into unsigned ints.