#include <userver/engine/deadline.hpp>
Internal representation of a deadline time point. 
Definition at line 16 of file deadline.hpp.
 | 
| using  | Clock = std::chrono::steady_clock | 
|   | 
| using  | TimePoint = Clock::time_point | 
|   | 
| using  | Duration = TimePoint::duration | 
|   | 
 | 
| 
constexpr  | Deadline ()=default | 
|   | Creates an unreachable deadline. 
  | 
|   | 
| constexpr bool  | IsReachable () const noexcept | 
|   | Returns whether the deadline can be reached.  
  | 
|   | 
| 
bool  | IsReached () const noexcept | 
|   | Returns whether the deadline is reached. 
  | 
|   | 
| bool  | IsSurelyReachedApprox () const noexcept | 
|   | 
| 
Duration  | TimeLeft () const noexcept | 
|   | Returns the duration of time left before the reachable deadline. 
  | 
|   | 
| Duration  | TimeLeftApprox () const noexcept | 
|   | 
| constexpr bool  | operator== (const Deadline &r) const noexcept | 
|   | 
| constexpr bool  | operator< (const Deadline &r) const noexcept | 
|   | 
 | 
| template<typename Rep , typename Period >  | 
| static Deadline  | FromDuration (const std::chrono::duration< Rep, Period > &incoming_duration) noexcept | 
|   | Converts duration to a Deadline.  
  | 
|   | 
| template<typename Clock , typename Duration >  | 
| static Deadline  | FromTimePoint (const std::chrono::time_point< Clock, Duration > &time_point) noexcept | 
|   | Converts time point to a Deadline.  
  | 
|   | 
| static constexpr Deadline  | Passed () noexcept | 
|   | A Deadline that is guaranteed to be IsReached.  
  | 
|   | 
◆ Clock
      
        
          | using engine::Deadline::Clock = std::chrono::steady_clock | 
        
      
 
 
◆ Duration
      
        
          | using engine::Deadline::Duration = TimePoint::duration | 
        
      
 
 
◆ TimePoint
      
        
          | using engine::Deadline::TimePoint = Clock::time_point | 
        
      
 
 
◆ FromDuration()
template<typename Rep , typename Period > 
  
  
      
        
          | static Deadline engine::Deadline::FromDuration  | 
          ( | 
          const std::chrono::duration< Rep, Period > & |           incoming_duration | ) | 
           | 
         
       
   | 
  
inlinestaticnoexcept   | 
  
 
 
◆ FromTimePoint()
template<typename Clock , typename Duration > 
  
  
      
        
          | static Deadline engine::Deadline::FromTimePoint  | 
          ( | 
          const std::chrono::time_point< Clock, Duration > & |           time_point | ) | 
           | 
         
       
   | 
  
inlinestaticnoexcept   | 
  
 
Converts time point to a Deadline. 
Non-steady clocks may produce inaccurate Deadlines. Prefer using Deadline::FromDuration or std::chrono::steady_clock::time_point if possible. 
Definition at line 88 of file deadline.hpp.
 
 
◆ IsReachable()
  
  
      
        
          | constexpr bool engine::Deadline::IsReachable  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineconstexprnoexcept   | 
  
 
Returns whether the deadline can be reached. 
Definition at line 26 of file deadline.hpp.
 
 
◆ IsSurelyReachedApprox()
  
  
      
        
          | bool engine::Deadline::IsSurelyReachedApprox  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
noexcept   | 
  
 
Returns whether the deadline is reached. Will report false-negatives, will never report false-positives. 
 
 
◆ operator<()
  
  
      
        
          | constexpr bool engine::Deadline::operator<  | 
          ( | 
          const Deadline & |           r | ) | 
           const | 
         
       
   | 
  
inlineconstexprnoexcept   | 
  
 
 
◆ operator==()
  
  
      
        
          | constexpr bool engine::Deadline::operator==  | 
          ( | 
          const Deadline & |           r | ) | 
           const | 
         
       
   | 
  
inlineconstexprnoexcept   | 
  
 
 
◆ Passed()
  
  
      
        
          | static constexpr Deadline engine::Deadline::Passed  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinestaticconstexprnoexcept   | 
  
 
 
◆ TimeLeftApprox()
  
  
      
        
          | Duration engine::Deadline::TimeLeftApprox  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
noexcept   | 
  
 
 
The documentation for this class was generated from the following file: