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 (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...
 CDeadline (EType type)
 Initialize deadline of specified type. 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


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

See also

Definition at line 1829 of file ncbitime.hpp.

The documentation for this class was generated from the following files:
Modified on Mon Mar 04 05:11:29 2024 by rev. 669887