You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Joseph Wu <jo...@mesosphere.io> on 2016/12/07 22:17:04 UTC
Re: Review Request 53708: Remove warnings from `duration.hpp`.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53708/#review158417
-----------------------------------------------------------
3rdparty/stout/include/stout/duration.hpp (lines 99 - 100)
<https://reviews.apache.org/r/53708/#comment229180>
These two types are supposed to be `time_t` and `suseconds_t`.
This code is odd in that `secs()` and `us()` will cast an `int` to `double` and back to `int`. Better to just do:
```
t.tv_sec = ns() / SECONDS;
t.tv_usec = us() / MICROSECONDS - t.tv_sec * MILLISECONDS;
```
- Joseph Wu
On Nov. 13, 2016, 9:45 p.m., Daniel Pravat wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53708/
> -----------------------------------------------------------
>
> (Updated Nov. 13, 2016, 9:45 p.m.)
>
>
> Review request for mesos, Alex Naparu, Artem Harutyunyan, Alex Clemmer, Joseph Wu, and Michael Park.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Remove warnings from `duration.hpp`.
>
>
> Diffs
> -----
>
> 3rdparty/stout/include/stout/duration.hpp 0a30a09678c20937caa6f094c3c63a326e357932
>
> Diff: https://reviews.apache.org/r/53708/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Daniel Pravat
>
>