mirror of
https://github.com/hyprwm/Hyprland
synced 2026-04-25 18:00:41 +02:00
Corrected Time::secNsec(system_tp) to use system_clock durations, keeping conversions consistent
This commit is contained in:
parent
67c1b2e0a2
commit
197e492e46
1 changed files with 1 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ uint64_t Time::millis(const system_tp& tp) {
|
|||
|
||||
s_ns Time::secNsec(const system_tp& tp) {
|
||||
const uint64_t sec = chr::duration_cast<chr::seconds>(tp.time_since_epoch()).count();
|
||||
const chr::steady_clock::duration nsecdur = tp - chr::system_clock::time_point(chr::seconds(sec));
|
||||
const chr::system_clock::duration nsecdur = tp - chr::system_clock::time_point(chr::seconds(sec));
|
||||
return std::make_pair<>(sec, chr::duration_cast<chr::nanoseconds>(nsecdur).count());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue