A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/ns__precise__time_8hpp_source.html below:

NCBI C++ ToolKit: src/app/netschedule/ns_precise_time.hpp Source File

Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef NS_PRECISE_TIME__HPP 2 #define NS_PRECISE_TIME__HPP 58

clock_gettime(CLOCK_REALTIME, &

result

);

74

{ tv_sec =

int

(time);

81

{ tv_sec = other.tv_sec;

82

tv_nsec = other.tv_nsec; }

84

{ tv_sec = rhs.tv_sec;

85

tv_nsec = rhs.tv_nsec;

92

time_t

Sec

(

void

)

const 100  if

(tv_sec <

t

.tv_sec)

102  else if

(tv_sec >

t

.tv_sec)

104  else if

(tv_nsec <

t

.tv_nsec)

106  else if

(tv_nsec >

t

.tv_nsec)

114

tv_nsec +=

t

.tv_nsec;

124  if

(tv_nsec >=

t

.tv_nsec) {

125

tv_nsec -=

t

.tv_nsec;

130

tv_nsec -=

t

.tv_nsec;

143  operator

double ()

const 144 

{

return

(

double

)tv_sec + ((double)tv_nsec / (

double

)

kNSecsPerSecond

); }

169  return

lhs.tv_sec == rhs.tv_sec &&

170

lhs.tv_nsec == rhs.tv_nsec;

177  return

!(lhs == rhs);

184  CTime

converted(

t

.Sec());

189  return

converted.

AsString

() +

".0"

;

192

sprintf(

buffer

,

".%06lu"

, usec);

203

sprintf(

buffer

,

"%lu.0"

,

t

.Sec());

205

sprintf(

buffer

,

"%lu.%06lu"

,

t

.Sec(), usec);

bool operator<=(const CNSPreciseTime &t) const

CNSPreciseTime(time_t sec)

CNSPreciseTime & operator=(CNSPreciseTime &&)=default

static CNSPreciseTime Never(void)

CNSPreciseTime(const CNSPreciseTime &other)

bool operator>(const CNSPreciseTime &t) const

int Compare(const CNSPreciseTime &t) const

CNSPreciseTime & operator+=(const CNSPreciseTime &t)

CNSPreciseTime & operator=(const CNSPreciseTime &rhs)

CNSPreciseTime & operator-=(const CNSPreciseTime &t)

CNSPreciseTime(double time)

bool operator<(const CNSPreciseTime &t) const

CNSPreciseTime(CNSPreciseTime &&)=default

CNSPreciseTime(unsigned int sec, unsigned int nsec)

bool operator>=(const CNSPreciseTime &t) const

static CNSPreciseTime Current(void)

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

CTime & ToLocalTime(void)

Convert the time into local time.

string AsString(const CTimeFormat &format=kEmptyStr, TSeconds out_tz=eCurrentTimeZone) const

Transform time to string.

unsigned int

A callback function used to compare two keys in a database.

Defines: CTimeFormat - storage class for time format.

CNSPreciseTime operator-(const CNSPreciseTime &lhs, const CNSPreciseTime &rhs)

const CNSPreciseTime kTimeZero

CNSPreciseTime operator+(const CNSPreciseTime &lhs, const CNSPreciseTime &rhs)

bool operator!=(const CNSPreciseTime &lhs, const CNSPreciseTime &rhs)

bool operator==(const CNSPreciseTime &lhs, const CNSPreciseTime &rhs)

const CNSPreciseTime kTimeNever

string NS_FormatPreciseTimeAsSec(const CNSPreciseTime &t)

string NS_FormatPreciseTime(const CNSPreciseTime &t)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4