fix: "Implicit conversion loses integer precision" warnings (#3960)

This commit is contained in:
A Cœur
2022-10-26 00:14:42 +08:00
committed by GitHub
parent 14f2698cdc
commit 12e564096b
38 changed files with 284 additions and 281 deletions

View File

@@ -98,7 +98,7 @@ private:
auto const secs = duration_cast<seconds>(interval_);
auto tv = timeval{};
tv.tv_sec = secs.count();
tv.tv_usec = duration_cast<microseconds>(interval_ - secs).count();
tv.tv_usec = static_cast<suseconds_t>(duration_cast<microseconds>(interval_ - secs).count());
evtimer_add(evtimer_, &tv);
}