From eaef9348431ea331ecf118aefc21246dbcf2c998 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sat, 15 Oct 2022 14:03:28 -0700 Subject: Add memory implementation as well; reorg. --- stat.h | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 stat.h (limited to 'stat.h') diff --git a/stat.h b/stat.h deleted file mode 100644 index f1ca75a..0000000 --- a/stat.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -#include -#include - -#include "infra/sim.h" - -namespace infra { - struct stat : public sim { - std::string name; - std::uint64_t numerator = 0; - std::uint64_t denominator = 0; - - stat(std::string name) - : name(std::move(name)) - { } - - ~stat() { - fmt::print("# {} {}\n", name, (double)numerator/(double)denominator); - } - - void unclock() { - ++denominator; - } - - stat & operator++() { - ++numerator; - return *this; - } - - stat & operator++(int) { - return operator++(); - } - }; -} -- cgit v1.2.3