d765da0acf77fc01a8aa5f2f6265e7ac8d94fe20
[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 friend std::ostream& operator<<(std::ostream& os, const Timer& t);
22
23 private:
24 std::chrono::time_point<std::chrono::high_resolution_clock> time;
25 };
26
27 std::ostream& operator<<(std::ostream& os, const Timer& t);
28
29 #endif