46 std::ostream::fmtflags old = o.flags();
48 micro = (micro << 32) | ptv.
tv_low;
61 o << y << ((y > 1) ?
_(
" years ") :
_(
" year "));
63 o << d << ((d > 1) ?
_(
" days ") :
_(
" day "));
65 o << h << ((h != 1) ?
_(
" hours ") :
_(
" hour "));
67 o << m << ((m != 1) ?
_(
" minutes ") :
_(
" minute "));
68 o << s << ((s != 1) ?
_(
" seconds") :
_(
" second"));
87 std::ostream::fmtflags old = s.flags();
90 s <<
"offs: " << std::dec << h <<
"h";
92 s <<
", " << m <<
"m";
133 PsiTime(
struct timeval *_utv,
struct timezone *_utz =
nullptr);
156 PsiTime(
const uint32_t _ptvHi,
const uint32_t _ptvLo);
193 void setPsiTime(
const uint32_t _ptvHi,
const uint32_t _ptvLo);
Psion time related utility class.
bool operator==(const PsiTime &t)
Comparison operators.
~PsiTime()
Destroys the instance.
bool operator>(const PsiTime &t)
uint32_t getPsiTimeHi(void)
Retrieves the instance's current value in Psion time format, low 32 bits.
void setPsiZone(psi_timezone *_ptz)
Sets the Psion time zone of this instance.
psi_timeval & getPsiTimeval(void)
Retrieves the instance's current value in Psion time format.
PsiTime & operator=(const PsiTime &t)
Assignment operator.
uint32_t getPsiTimeLo(void)
Retrieves the instance's current value in Psion time format, high 32 bits.
uint32_t getSiboTime()
Retrieves the instance's current value in SIBO time format.
void setUnixNow(void)
Sets the value of this instance to the current time of the Unix machine.
bool operator<(const PsiTime &t)
void setSiboTime(uint32_t stime)
Modifies the value of this instance.
friend std::ostream & operator<<(std::ostream &s, const PsiTime &t)
Prints the instance's value in human readable format.
time_t getTime(void)
Retrieves the instance's current value in Unix time format.
void setUnixTime(struct timeval *_utv)
Sets the value of this instance.
PsiTime(void)
Constructs a new instance, initializing to now.
struct timeval & getTimeval(void)
Retrieves the instance's current value in Unix time format.
void setPsiTime(psi_timeval *_ptv)
Modifies the value of this instance.
A singleton wrapper for a psi_timezone .
void setZone(psi_timezone &ptz)
bool getZone(psi_timezone &ptz)
Retrieve the Psion time zone.
PsiZone()
Private constructor.
static PsiZone * _instance
This objects instance (singleton)
static PsiZone & getInstance()
Retrieve the singleton object.
This is the implementation of the rpcs protocol for Psion series 5 (EPOC) variant.
struct psi_timeval_t psi_timeval
Holds a Psion time value.
struct psi_timezone_t psi_timezone
holds a Psion time zone description.
Holds a Psion time value.
uint32_t tv_low
The lower 32 bits.
friend std::ostream & operator<<(std::ostream &o, const psi_timeval_t &ptv)
Prints a psi_timeval in human readable format.
uint32_t tv_high
The upper 32 bits.
holds a Psion time zone description.
friend std::ostream & operator<<(std::ostream &s, const psi_timezone_t &ptz)