cf-natali commented on a change in pull request #410:
URL: https://github.com/apache/mesos/pull/410#discussion_r730092807



##########
File path: 3rdparty/libprocess/include/process/timeout.hpp
##########
@@ -34,10 +34,20 @@ class Timeout
   // from now.
   static Timeout in(const Duration& duration)
   {
+    Time now = Clock::now();
+    if (duration < Duration::zero()) {

Review comment:
       I'm a bit confused - why not simply return `now` if the duration is 
negative?

##########
File path: 3rdparty/libprocess/include/process/timeout.hpp
##########
@@ -34,10 +34,20 @@ class Timeout
   // from now.
   static Timeout in(const Duration& duration)
   {
+    Time now = Clock::now();
+    if (duration < Duration::zero()) {

Review comment:
       Alright I see, to preserve relative ordering of expired timeouts.
   I guess that makes sense.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@mesos.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to