CpEpEngine.cpp
branchENGINE-187
changeset 245 ffcbcf8934a1
parent 244 8c258e7d10f4
child 246 3b4c910af3be
     1.1 --- a/CpEpEngine.cpp	Thu Apr 20 16:40:42 2017 +0200
     1.2 +++ b/CpEpEngine.cpp	Fri Apr 21 10:50:29 2017 +0200
     1.3 @@ -1263,7 +1263,7 @@
     1.4          me->notify_handshake_deliver_result();
     1.5  
     1.6      if (timeout && *timeout) {
     1.7 -        auto end_time = std::chrono::steady_clock::now()
     1.8 +        std::chrono::steady_clock::time_point end_time = std::chrono::steady_clock::now()
     1.9              + std::chrono::seconds(*timeout);
    1.10  
    1.11          while (me->keysync_queue.empty() && !me->keysync_abort_requested)
    1.12 @@ -1280,11 +1280,12 @@
    1.13              } 
    1.14              else 
    1.15              {
    1.16 -                auto now = std::chrono::steady_clock::now()
    1.17 +                std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
    1.18 +
    1.19                  if (now < end_time) 
    1.20                  {
    1.21 -                    std::chrono::duration<time_t> remaining_seconds = end_time - now;
    1.22 -                    *timeout = remaining_seconds.count();
    1.23 +                    std::chrono::seconds remaining = end_time - now;
    1.24 +                    *timeout = remaining.count();
    1.25                  } 
    1.26                  else 
    1.27                  {