angelos's commit files

This commit is contained in:
Angelos Katharopoulos
2023-11-29 10:42:59 -08:00
parent 8ca7f9e8e9
commit d1f86272a2
56 changed files with 12350 additions and 0 deletions

18
examples/cpp/timer.h Normal file
View File

@@ -0,0 +1,18 @@
#pragma once
#include <chrono>
namespace timer {
using namespace std::chrono;
template <typename R, typename P>
inline double seconds(duration<R, P> x) {
return duration_cast<nanoseconds>(x).count() / 1e9;
}
inline auto time() {
return high_resolution_clock::now();
}
} // namespace timer