Stefan Schuermans
implemented base class for I/O objects
Stefan Schuermans commited f11b050 at 2011-10-25 18:34:13
/* Blinker
Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org>
Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
a blinkenarea.org project */
#ifndef TIME_H
#define TIME_H
#include <stdint.h>
#include <sys/time.h>
#include <time.h>
namespace Blinker {
/// time, either point in time or duration
class Time
{
public:
static const Time zero; ///< zero time
public:
/**
* @brief get current time
* @return current time
*/
static Time now();
public:
/// constructor
Time();
/**
* @brief constructor from seconds
* @param[in] t time in seconds
*/
Time(time_t t);
public:
/// comparison
//@{
int compare(const Time &that) const;
bool operator==(const Time &that) const;
bool operator!=(const Time &that) const;
bool operator<(const Time &that) const;
bool operator>(const Time &that) const;
bool operator<=(const Time &that) const;
bool operator>=(const Time &that) const;
//@}
/// arithmetic
//@{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX