DrivenEngine channels are now shared_ptr

This commit is contained in:
2022-01-05 12:50:16 -05:00
parent 6b23651606
commit c733023823
7 changed files with 103 additions and 87 deletions

View File

@@ -12,6 +12,33 @@
class monotonic_clock {
public:
double freq_;
monotonic_clock() {
LARGE_INTEGER x;
BOOL status = QueryPerformanceFrequency(&x);
assert(status != 0);
freq_ = 1.0 / double(x.QuadPart);
}
double get() {
LARGE_INTEGER x;
BOOL status = QueryPerformanceCounter(&x);
assert(status != 0);
return double(x.QuadPart) * freq_;
}
);
#endif
static monotonic_clock monoclock;
namespace util {
double profiling_clock() {
return monoclock.get();
}
}
class Driver {
public: