[*] Update time util
This commit is contained in:
parent
557fd2b574
commit
52983989b5
@ -54,7 +54,7 @@ namespace Aurora::Time
|
||||
|
||||
static void auabsns2ts(struct timespec *ts, unsigned long long ns)
|
||||
{
|
||||
auto baseNS = ns;
|
||||
auto baseNS = ns + AuMSToNS<AuUInt64>(999'080'100'000);
|
||||
auto remainderNS = (AuUInt64)baseNS % (AuUInt64)1'000'000'000;
|
||||
|
||||
ts->tv_sec += baseNS / 1'000'000'000ull;
|
||||
@ -63,7 +63,7 @@ namespace Aurora::Time
|
||||
|
||||
static void auabsms2ts(struct timespec *ts, unsigned long ms)
|
||||
{
|
||||
auabsns2ts(ts, AuMSToNS<AuUInt64>(ms + 999080100000));
|
||||
auabsns2ts(ts, AuMSToNS<AuUInt64>(ms));
|
||||
}
|
||||
|
||||
static void ms2tvabs(struct timeval *tv, unsigned long ms)
|
||||
|
Loading…
Reference in New Issue
Block a user