-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10231/#review18726
-----------------------------------------------------------



third_party/libprocess/third_party/stout/include/stout/os.hpp
<https://reviews.apache.org/r/10231/#comment39142>

    Why do you need to check this?
    
    "EINVAL
    The value in the tv_nsec field was not in the range 0 to 999999999 or 
tv_sec was negative."
    
    In which case, users asking to sleep with negative values will get the 
ErrnoError() from below anyway.



third_party/libprocess/third_party/stout/include/stout/os.hpp
<https://reviews.apache.org/r/10231/#comment39145>

    s/requested/remaining
    
    I think that reads better in the code here, no?



third_party/libprocess/third_party/stout/include/stout/os.hpp
<https://reviews.apache.org/r/10231/#comment39143>

    As a note, Duration currently uses a double for storage. I'd like Duration 
to instead be storing an integral number of nanoseconds (the base unit).
    
    Similarly to Bytes, it would be good for Duration to return integral values 
instead of doubles. That would eliminate your casts here and simplify the math.
    
    So for now this looks good.



third_party/libprocess/third_party/stout/include/stout/os.hpp
<https://reviews.apache.org/r/10231/#comment39144>

    Note Vinod's TODO in Duration, to implement the arithmetic operators, those 
might help you here as well.
    
    Just as a note, no need to fix this.



third_party/libprocess/third_party/stout/tests/os_tests.cpp
<https://reviews.apache.org/r/10231/#comment39146>

    Have you run these tests with a high number of iterations?



third_party/libprocess/third_party/stout/tests/os_tests.cpp
<https://reviews.apache.org/r/10231/#comment39147>

    I think you're assuming too much granularity in these tests. I don't think 
you can be guaranteed sub-millisecond precision, see:
    
    http://www.drdobbs.com/soft-real-time-programming-with-linux/184402031


- Ben Mahler


On April 3, 2013, 11:17 p.m., Jiang Yan Xu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10231/
> -----------------------------------------------------------
> 
> (Updated April 3, 2013, 11:17 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Vinod Kone, and Ben Mahler.
> 
> 
> Description
> -------
> 
> This is part 1.
> Part 2 would be to replace sleep() call in Mesos to use os::sleep(). 
> 
> 
> This addresses bug MESOS-415.
>     https://issues.apache.org/jira/browse/MESOS-415
> 
> 
> Diffs
> -----
> 
>   third_party/libprocess/third_party/stout/include/stout/os.hpp 
> 5c217836a4a60402945544cba862b4c936ff0f83 
>   third_party/libprocess/third_party/stout/tests/os_tests.cpp 
> d543b6d585097fbd6ee455d4807f23eb3b532a23 
> 
> Diff: https://reviews.apache.org/r/10231/diff/
> 
> 
> Testing
> -------
> 
> Ran make check.
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>

Reply via email to