fix: allow assignment of time points of resolutions other than that of a system clock (#2481)

This commit is contained in:
Boris Staletic
2020-09-13 16:24:00 +02:00
committed by GitHub
parent 38370a87f4
commit cc982ac1cd
3 changed files with 39 additions and 1 deletions

View File

@@ -140,7 +140,7 @@ public:
}
else return false;
value = system_clock::from_time_t(std::mktime(&cal)) + msecs;
value = time_point_cast<Duration>(system_clock::from_time_t(std::mktime(&cal)) + msecs);
return true;
}