clang-tools  14.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::clangd::Deadline Class Reference

A point in time we can wait for. More...

#include <Threading.h>

Public Member Functions

 Deadline (std::chrono::steady_clock::time_point Time)
 
std::chrono::steady_clock::time_point time () const
 
bool expired () const
 
bool operator== (const Deadline &Other) const
 

Static Public Member Functions

static Deadline zero ()
 
static Deadline infinity ()
 

Detailed Description

A point in time we can wait for.

Can be zero (don't wait) or infinity (wait forever). (Not time_point::max(), because many std::chrono implementations overflow).

Definition at line 59 of file Threading.h.

Constructor & Destructor Documentation

◆ Deadline()

clang::clangd::Deadline::Deadline ( std::chrono::steady_clock::time_point  Time)
inline

Definition at line 61 of file Threading.h.

Referenced by infinity(), and zero().

Member Function Documentation

◆ expired()

bool clang::clangd::Deadline::expired ( ) const
inline

Definition at line 70 of file Threading.h.

◆ infinity()

static Deadline clang::clangd::Deadline::infinity ( )
inlinestatic

◆ operator==()

bool clang::clangd::Deadline::operator== ( const Deadline Other) const
inline

Definition at line 74 of file Threading.h.

◆ time()

std::chrono::steady_clock::time_point clang::clangd::Deadline::time ( ) const
inline

Definition at line 66 of file Threading.h.

◆ zero()

static Deadline clang::clangd::Deadline::zero ( )
inlinestatic

Definition at line 63 of file Threading.h.

References Deadline().

Referenced by clang::clangd::wait().


The documentation for this class was generated from the following file: