summaryrefslogtreecommitdiffhomepage
path: root/dev/misc/BenchKit/Chronometer.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-09-02 08:10:50 +0200
committerGitHub <noreply@github.com>2025-09-02 08:10:50 +0200
commitaead694f3cada63e4dc2d79653a5b0efe0d9f49f (patch)
tree419c04a35244ca0f34dd537e5ee052fb732ebabc /dev/misc/BenchKit/Chronometer.h
parent36f7cf9ca4eb917ffd09fdfa6abf04ee10f3dc7e (diff)
parent1661e5d91d8e7984f916e3ccf78311b4b8c00940 (diff)
Merge pull request #60 from nekernel-org/dev
v0.0.4e4 — Langley
Diffstat (limited to 'dev/misc/BenchKit/Chronometer.h')
-rw-r--r--dev/misc/BenchKit/Chronometer.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/dev/misc/BenchKit/Chronometer.h b/dev/misc/BenchKit/Chronometer.h
new file mode 100644
index 00000000..3a82a94e
--- /dev/null
+++ b/dev/misc/BenchKit/Chronometer.h
@@ -0,0 +1,40 @@
+/* -------------------------------------------
+
+Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef BENCHKIT_CHRONO_H
+#define BENCHKIT_CHRONO_H
+
+#include <CompilerKit/CompilerKit.h>
+#include <NeKit/Defines.h>
+
+/// @author Amlal El Mahrouss
+/// @brief BenchKit Chrono contract.
+
+#define BENCHKIT_INTERFACE : public ::Kernel::ChronoInterface
+
+namespace Kernel {
+class ChronoInterface;
+
+/// @brief a Chronometer interface used for benchmarking.
+class ChronoInterface {
+ public:
+ ChronoInterface() = default;
+ virtual ~ChronoInterface() = default;
+
+ NE_COPY_DEFAULT(ChronoInterface)
+
+ virtual Void Start() = 0;
+ virtual Void Stop() = 0;
+ virtual Void Reset() = 0;
+ virtual UInt64 GetElapsedTime() const = 0;
+};
+} // namespace Kernel
+
+namespace BenchKit {
+using namespace Kernel;
+}
+
+#endif // BENCHKIT_CHRONO_H