#ifndef GLOBALS_H #define GLOBALS_H #include #include #include #include #include #include #include #include #include #include typedef int nanoseconds_t; class Bytes; extern double getCurrentTime(); extern void hexdump(std::ostream& stream, const Bytes& bytes); extern void hexdumpForSrp16(std::ostream& stream, const Bytes& bytes); class Error { public: [[ noreturn ]] ~Error() { std::cerr << "Error: " << _stream.str() << std::endl; exit(1); } template Error& operator<<(T&& t) { _stream << t; return *this; } private: std::stringstream _stream; }; #endif