00001 #ifndef TIME_H_INCLUDED_ 00002 #define TIME_H_INCLUDED_ 00003 00004 #include <iostream> 00005 00006 namespace risc { 00007 00008 namespace sg { 00009 00014 class Time { 00015 public: 00016 00021 Time(); 00022 00028 Time(unsigned long long time_units, int delta_count); 00029 00035 Time(unsigned long long time_units, int delta_count, bool infinite); 00036 00041 Time(bool infinite); 00042 00043 int delta_count_; 00044 unsigned long long time_units_; 00045 00046 bool operator<(const Time &ohs); 00047 bool operator>(const Time &ohs); 00048 00049 bool operator<=(const Time &ohs); 00050 bool operator>=(const Time &ohs); 00051 00052 bool operator==(const Time &ohs); 00053 bool operator!=(const Time &ohs); 00054 00055 Time operator+(const Time &ohs); 00056 Time& operator+=(const Time &ohs); 00057 00061 bool infinite_; 00062 00068 bool one_delta_cycle_ahead(const Time &ohs); 00069 00070 00071 00072 static long long convert_si_magnitude(std::string magnitude); 00073 00074 }; 00075 00076 std::ostream& operator<<(std::ostream& os, const risc::sg::Time& time); 00077 00078 }; // end of namesapce sg 00079 00080 }; // end of namespace risc 00081 00082 #endif /* TIME_H_INCLUDED_ */ 00083 00084 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */