#define implement_operator(op) \
bool Microsecond::operator op (const Millisecond& other) const \
- throw ()\
+ \
{\
return a_value op (((type_t) other.a_value) * 1000);\
}\
bool Microsecond::operator op (const Second& other) const\
- throw ()\
+ \
{\
return a_value op ((type_t) other.a_value * 1000000);\
}
Microsecond::Microsecond(const Second& other) : a_value(other.a_value) { a_value *= (type_t)1000000; }
Microsecond& Microsecond::operator= (const Millisecond & other)
-throw() {
+{
a_value = other.a_value;
a_value *= (type_t)1000;
return *this;
}
Microsecond& Microsecond::operator= (const Second & other)
-throw() {
+{
a_value = other.a_value;
a_value *= (type_t)1000000;
return *this;
//static
Microsecond Microsecond::getTime()
-throw() {
+{
struct timeval tv;
gettimeofday(&tv, NULL);
Microsecond result(Second(tv.tv_sec));
}
string Microsecond::asString() const
-throw() {
+{
string result(functions::asString(a_value));
return result += " us";
}
//static
Microsecond Microsecond::fromString(const std::string& value)
-throw(RuntimeException) {
+noexcept(false) {
if(value.find(" us") == string::npos) {
string msg("String: ");
msg += value;