reprodyne/tests/oopsiewhoopsie.h

23 lines
510 B
C++

//This file is part of the reprodyne project and is licensed under the terms of the LGPL-3.0-only
#pragma once
#include <chrono>
#include <exception>
//Common test code, no namespace because it's just for testing and not for
// the library itself.
class OopsieWhoopsie : public std::exception
{
public:
OopsieWhoopsie(const int code): code(code) {}
const int code;
};
inline double time()
{
return std::chrono::duration<double>(std::chrono::steady_clock::now().time_since_epoch()).count();
}