X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Fcore%2Futil%2FMicrosecond.cpp;fp=source%2Fcore%2Futil%2FMicrosecond.cpp;h=5b1bce463995671f0c7499e29883bdd86f1afa19;hp=9cd19bfe49b2e55364e64957a3eea814e250dd14;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/source/core/util/Microsecond.cpp b/source/core/util/Microsecond.cpp index 9cd19bf..5b1bce4 100644 --- a/source/core/util/Microsecond.cpp +++ b/source/core/util/Microsecond.cpp @@ -20,12 +20,12 @@ using namespace anna; #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);\ } @@ -35,14 +35,14 @@ Microsecond::Microsecond(const Millisecond& other) : a_value(other.a_value) { a_ 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; @@ -56,7 +56,7 @@ implement_operator( <) //static Microsecond Microsecond::getTime() -throw() { +{ struct timeval tv; gettimeofday(&tv, NULL); Microsecond result(Second(tv.tv_sec)); @@ -65,14 +65,14 @@ throw() { } 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;