Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Common.hpp File Reference
#include <cinttypes>
#include <memory>
#include <sys/time.h>
#include <string>
#include <cstdlib>
Include dependency graph for Common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  irr::io::IIrrXMLReader< char_type, super_class >
 

Namespaces

 irr
 
 irr::io
 

Macros

#define OT_ERROR_AMOUNT   INT64_MIN
 
#define OT_TIME_YEAR_IN_SECONDS   OTTimeGetTimeFromSeconds(31536000)
 
#define OT_TIME_SIX_MONTHS_IN_SECONDS   OTTimeGetTimeFromSeconds(15552000)
 
#define OT_TIME_THREE_MONTHS_IN_SECONDS   OTTimeGetTimeFromSeconds(7776000)
 
#define OT_TIME_MONTH_IN_SECONDS   OTTimeGetTimeFromSeconds(2592000)
 
#define OT_TIME_DAY_IN_SECONDS   OTTimeGetTimeFromSeconds(86400)
 
#define OT_TIME_HOUR_IN_SECONDS   OTTimeGetTimeFromSeconds(3600)
 
#define OT_TIME_MINUTE_IN_SECONDS   OTTimeGetTimeFromSeconds(60)
 
#define OT_TIME_ZERO   OTTimeGetTimeFromSeconds((int64_t)0)
 

Typedefs

typedef int64_t time64_t
 

Functions

time64_t OTTimeGetCurrentTime ()
 
time64_t OTTimeGetTimeFromSeconds (int64_t seconds)
 
time64_t OTTimeGetTimeFromSeconds (const char *pSeconds)
 
int64_t OTTimeGetSecondsFromTime (time64_t time)
 
int64_t OTTimeGetTimeInterval (time64_t lhs, time64_t rhs)
 
time64_t OTTimeAddTimeInterval (time64_t lhs, int64_t rhs)
 

Macro Definition Documentation

#define OT_ERROR_AMOUNT   INT64_MIN

Definition at line 166 of file Common.hpp.

#define OT_TIME_DAY_IN_SECONDS   OTTimeGetTimeFromSeconds(86400)

Definition at line 176 of file Common.hpp.

#define OT_TIME_HOUR_IN_SECONDS   OTTimeGetTimeFromSeconds(3600)

Definition at line 177 of file Common.hpp.

#define OT_TIME_MINUTE_IN_SECONDS   OTTimeGetTimeFromSeconds(60)

Definition at line 178 of file Common.hpp.

#define OT_TIME_MONTH_IN_SECONDS   OTTimeGetTimeFromSeconds(2592000)

Definition at line 174 of file Common.hpp.

#define OT_TIME_SIX_MONTHS_IN_SECONDS   OTTimeGetTimeFromSeconds(15552000)

Definition at line 170 of file Common.hpp.

#define OT_TIME_THREE_MONTHS_IN_SECONDS   OTTimeGetTimeFromSeconds(7776000)

Definition at line 172 of file Common.hpp.

#define OT_TIME_YEAR_IN_SECONDS   OTTimeGetTimeFromSeconds(31536000)

Definition at line 168 of file Common.hpp.

#define OT_TIME_ZERO   OTTimeGetTimeFromSeconds((int64_t)0)

Definition at line 180 of file Common.hpp.

Typedef Documentation

typedef int64_t time64_t

Definition at line 209 of file Common.hpp.

Function Documentation

time64_t OTTimeAddTimeInterval ( time64_t  lhs,
int64_t  rhs 
)
inline

Definition at line 238 of file Common.hpp.

239 {
240  return lhs + rhs;
241 }
time64_t OTTimeGetCurrentTime ( )
inline

Definition at line 211 of file Common.hpp.

212 {
213  return time(nullptr);
214 }
int64_t OTTimeGetSecondsFromTime ( time64_t  time)
inline

Definition at line 230 of file Common.hpp.

231 {
232  return time;
233 }
time64_t OTTimeGetTimeFromSeconds ( int64_t  seconds)
inline

Definition at line 215 of file Common.hpp.

216 {
217  return seconds;
218 }
time64_t OTTimeGetTimeFromSeconds ( const char *  pSeconds)
inline

Definition at line 225 of file Common.hpp.

226 {
227  return std::atol(pSeconds);
228 }
int64_t OTTimeGetTimeInterval ( time64_t  lhs,
time64_t  rhs 
)
inline

Definition at line 234 of file Common.hpp.

235 {
236  return lhs - rhs;
237 }