mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
Utilities: Use lround() instead of casting round() to long
And one case where we previously cast to int, since the extra precision does not matter.
This commit is contained in:
parent
f2ae25deee
commit
b3cd91d26d
3 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.parse(arguments);
|
||||
|
||||
if (delta.has_value()) {
|
||||
long delta_us = static_cast<long>(round(*delta * 1'000'000));
|
||||
long delta_us = lround(*delta * 1'000'000);
|
||||
timeval delta_timeval;
|
||||
delta_timeval.tv_sec = delta_us / 1'000'000;
|
||||
delta_timeval.tv_usec = delta_us % 1'000'000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue