X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=src%2FUtils.cpp;h=2de443dfc51ea5cd825c2710053c270ab9d6cfd0;hb=fb173a9728e915fc7b3f99bc41f55034757105df;hp=b60be5094f1ae04f544db0531c228d53182e0015;hpb=7975d02c6c1ee679a236087e86955c086f1a9a8e;p=crypto_lab3.git diff --git a/src/Utils.cpp b/src/Utils.cpp index b60be50..2de443d 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -3,11 +3,6 @@ #include using namespace std; -void Utils::print(string name, mpz_class value) -{ - cout << name << ": " << value << endl; -} - Timer::Timer() : time(chrono::high_resolution_clock::now()) {} @@ -17,6 +12,11 @@ int Timer::ms() const return chrono::duration_cast(chrono::high_resolution_clock::now() - this->time).count(); } +void Timer::reset() +{ + this->time = chrono::high_resolution_clock::now(); +} + ostream& operator<<(ostream& os, const Timer& t) { os << t.ms() << " ms";