Index volume scan by time, change internal data structure from unordered to ordered map

This commit is contained in:
Dan Paulat 2021-11-12 21:37:48 -06:00
parent e78231ac48
commit efeb87baaa
9 changed files with 104 additions and 71 deletions

View file

@ -0,0 +1,20 @@
#include <scwx/util/time.hpp>
namespace scwx
{
namespace util
{
std::chrono::system_clock::time_point
TimePoint(uint16_t modifiedJulianDate, uint32_t milliseconds)
{
using namespace std::chrono;
using sys_days = time_point<system_clock, days>;
constexpr auto epoch = sys_days {1969y / December / 31d};
return epoch + (modifiedJulianDate * 24h) +
std::chrono::milliseconds {milliseconds};
}
} // namespace qt
} // namespace scwx