> On Jan. 29, 2014, 7:10 a.m., Benjamin Hindman wrote:
> > Not too bad!
> 
> Benjamin Hindman wrote:
>     One more thought: there is a part of me that doesn't want to add 
> clock::advanced unless we've every paused the clock. At the very least, how 
> about a comment in Time::create discussing clock::advanced and the fact that 
> in production code the clock should not have gotten paused and 'advanced' 
> will always be zero!

I'll add the comment. We could also make it an Option to better represent the 
semantics, if you like.


> On Jan. 29, 2014, 7:10 a.m., Benjamin Hindman wrote:
> > 3rdparty/libprocess/src/process.cpp, line 732
> > <https://reviews.apache.org/r/17480/diff/1/?file=453439#file453439line732>
> >
> >     Hook a brother up with some parens!

Parens for the right hand side, like this? 
clock::advanced += (time - clock::current);

+= has the same precedence as =, so I'm not sure why we would treat it any 
differently in terms of parens:
clock::advanced = time - clock::current;
vs.
clock::advanced += time - clock::current;

If you find it easier to read I'll add the parens.


> On Jan. 29, 2014, 7:10 a.m., Benjamin Hindman wrote:
> > 3rdparty/libprocess/src/process.cpp, line 775
> > <https://reviews.apache.org/r/17480/diff/1/?file=453439#file453439line775>
> >
> >     Are you worried that adding clock::advanced will overflow either? Also, 
> > any reason not to add clock::advanced to duration.get() instead of to 
> > Time(...)?

It could overflow if a test running in repetition resulted in time moving into 
the year 2262. I could add an overflow check here but perhaps it belongs in 
Duration instead.


- Ben


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


On Jan. 29, 2014, 3:38 a.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17480/
> -----------------------------------------------------------
> 
> (Updated Jan. 29, 2014, 3:38 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Jie Yu, and Vinod Kone.
> 
> 
> Bugs: MESOS-952
>     https://issues.apache.org/jira/browse/MESOS-952
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> We now track the total Duration that the Clock has been advanced.
> This is then used to ensure that Clock::now() returns a consistent value 
> after Clock::resume() is called.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/time.hpp 
> 307fd2ca9341ec4eb26107bcb07d4e17bdc0e0a6 
>   3rdparty/libprocess/src/process.cpp 
> bc7a1c5890df7c763b0b140b47966e457e519208 
> 
> Diff: https://reviews.apache.org/r/17480/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>

Reply via email to