NCBI C++ ToolKit
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CDeadline Class Reference

Search Toolkit Book for CDeadline

CDeadline. More...

#include <corelib/ncbitime.hpp>

Public Types

enum  EType : unsigned { eInfinite = numeric_limits<unsigned>::max() , eNoWait = 0u }
 Type of special deadlines. More...
 

Public Member Functions

 CDeadline (EType type=eNoWait)
 Initialize deadline of specified type. More...
 
 CDeadline (unsigned int rel_seconds, unsigned int rel_nanoseconds=0)
 Initialize deadline using seconds and nanoseconds (adding to the current time) More...
 
 CDeadline (const CTimeout &timeout)
 Initialize deadline by adding relative timeout to the current time. More...
 
bool IsInfinite (void) const
 Check if the deadline is infinite. More...
 
bool IsExpired (void) const
 Check if the deadline is expired. More...
 
void GetExpirationTime (time_t *sec, unsigned int *nanosec) const
 Get the number of seconds and nanoseconds (since 1/1/1970). More...
 
CNanoTimeout GetRemainingTime (void) const
 Get time left to the expiration. More...
 
bool operator< (const CDeadline &right_hand_operand) const
 Compare two CDeadline values. More...
 

Private Member Functions

 CDeadline (CTimeout::EType)
 
void x_SetNowPlus (unsigned int seconds, unsigned int nanoseconds)
 

Private Attributes

time_t m_Seconds
 
unsigned int m_Nanoseconds
 
bool m_Infinite
 

Detailed Description

CDeadline.

Given a relative timeout, compose the absolute time mark by adding the timeout to the current time.

See also
CTimeout

Definition at line 1829 of file ncbitime.hpp.


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:58:01 2024 by modify_doxy.py rev. 669887