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/nst__precise__time_8hpp_source.html below:

NCBI C++ ToolKit: src/app/netstorage/nst_precise_time.hpp Source File

Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef NST_PRECISE_TIME__HPP 2 #define NST_PRECISE_TIME__HPP 58

clock_gettime(CLOCK_REALTIME, &

result

);

74

{ tv_sec =

int

(time);

81

time_t

Sec

(

void

)

const 89  if

(tv_sec <

t

.tv_sec)

91  else if

(tv_sec >

t

.tv_sec)

93  else if

(tv_nsec <

t

.tv_nsec)

95  else if

(tv_nsec >

t

.tv_nsec)

103

tv_nsec +=

t

.tv_nsec;

113  if

(tv_nsec >=

t

.tv_nsec) {

114

tv_nsec -=

t

.tv_nsec;

119

tv_nsec -=

t

.tv_nsec;

132  operator

double ()

const 133 

{

return

(

double

)tv_sec + ((double)tv_nsec / (

double

)

kNSecsPerSecond

); }

158  return

lhs.tv_sec == rhs.tv_sec &&

159

lhs.tv_nsec == rhs.tv_nsec;

166  return

!(lhs == rhs);

173  CTime

converted(

t

.Sec());

178  return

converted.

AsString

() +

".0"

;

181

sprintf(

buffer

,

"%06lu"

, usec);

192

sprintf(

buffer

,

"%lu.0"

,

t

.Sec());

196

sprintf(

buffer

,

"%lu.%06lu"

,

t

.Sec(), usec);

bool operator>=(const CNSTPreciseTime &t) const

static CNSTPreciseTime Never(void)

CNSTPreciseTime & operator-=(const CNSTPreciseTime &t)

int Compare(const CNSTPreciseTime &t) const

bool operator<(const CNSTPreciseTime &t) const

CNSTPreciseTime & operator+=(const CNSTPreciseTime &t)

bool operator<=(const CNSTPreciseTime &t) const

CNSTPreciseTime(time_t sec)

CNSTPreciseTime(double time)

CNSTPreciseTime(unsigned int sec, unsigned int nsec)

static CNSTPreciseTime Current(void)

bool operator>(const CNSTPreciseTime &t) const

#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.

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

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

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

string NST_FormatPreciseTimeAsSec(const CNSTPreciseTime &t)

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

string NST_FormatPreciseTime(const CNSTPreciseTime &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