42 #ifndef _DWMTIMEVALUE64_HH_ 43 #define _DWMTIMEVALUE64_HH_ 46 #include <sys/types.h> 48 #if ((! __APPLE__) && (! __linux__)) 49 #include <sys/timespec.h> 104 void Set(
const struct timeval & tv);
109 void Set(uint64_t secs, uint32_t usecs);
114 uint64_t
Secs()
const;
119 uint32_t
Usecs()
const;
121 struct tm LocalTime() const;
162 std::istream &
Read(std::istream & is);
167 std::ostream &
Write(std::ostream & os)
const;
173 size_t Read(FILE *f);
179 size_t Write(FILE *f)
const;
185 ssize_t
Read(
int fd);
191 ssize_t
Write(
int fd)
const;
197 int Read(gzFile gzf);
203 int Write(gzFile gzf)
const;
215 int BZWrite(BZFILE *bzf)
const;
220 operator double ()
const;
234 #endif // _DWMTIMEVALUE64_HH_ uint32_t StreamedLength() const
Returns the number of bytes that would be written if one of the Write() members were called...
bool operator>=(const TimeValue64 &tv) const
operator >=
This class is a pure virtual class, defining an interface for classes that can write their contents t...
Definition: DwmGZWritable.hh:57
bool operator<(const TimeValue64 &tv) const
Less-than operator.
Dwm::Writable pure virtual class definition.
Dwm::BZ2Readable pure virtual class definition.
Dwm::GZReadable pure virtual class definition.
uint32_t Usecs() const
Returns the residual microseconds.
Dwm::Readable pure virtual class definition.
TimeValue64(bool setNow=false)
Constructor.
std::ostream & Write(std::ostream &os) const
Writes the TimeValue64 to an ostream. Returns the ostream.
std::istream & Read(std::istream &is)
Reads the TimeValue64 from an istream. Returns the istream.
bool operator<=(const TimeValue64 &tv) const
operator <=
This class is a pure virtual class, defining an interface for classes that can read their contents fr...
Definition: DwmBZ2Readable.hh:57
int BZRead(BZFILE *bzf)
Reads the TimeValue64 from a BZFILE pointer.
Dwm::BZ2Writable pure virtual class definition.
bool operator==(const TimeValue64 &tv) const
Equal-to operator.
Definition: DwmBZ2IO.hh:67
void Set(const struct timeval &tv)
Sets the TimeValue64 from the given struct timeval tv.
This class is a pure virtual class, defining an interface for classes that can read their contents fr...
Definition: DwmGZReadable.hh:57
int BZWrite(BZFILE *bzf) const
Writes the TimeValue64 to a BZFILE pointer.
This class defines an interface for classes that can write their contents to an ostream, file descriptor or FILE pointer.
Definition: DwmWritable.hh:58
uint64_t Secs() const
Returns the seconds.
This class is a pure virtual class, defining an interface for classes that can write their contents t...
Definition: DwmBZ2Writable.hh:57
Dwm::GZWritable pure virtual class definition.
This class defines an interface for classes that can read their contents from an istream, file descriptor or FILE pointer.
Definition: DwmReadable.hh:58
bool operator>(const TimeValue64 &tv) const
Greater-than operator.
void SetNow()
Sets the TimeValue64 to the current time.
This class encapsulates a time value beyond the UNIX epoch, with microsecond granularity.
Definition: DwmTimeValue64.hh:72