35077635e93d9e28d3724b0d96dbb23f1537f74f
[crypto_lab3.git] / src / Utils.h
1 #ifndef UTILS_H
2 #define UTILS_H
3
4 #include <chrono>
5 #include <string>
6 #include <iostream>
7
8 #include <gmpxx.h>
9
10 class Utils
11 {
12 public:
13 static void print(std::string name, mpz_class value);
14 };
15
16 class Timer
17 {
18 public:
19 Timer();
20 int ms() const;
21 void reset();
22 friend std::ostream& operator<<(std::ostream& os, const Timer& t);
23
24 private:
25 std::chrono::time_point<std::chrono::high_resolution_clock> time;
26 };
27
28 std::ostream& operator<<(std::ostream& os, const Timer& t);
29
30 #endif