chronon::observe::SimpleCounter
Lightweight single-threaded counter (~1-2ns increment). More...
#include <Counter.hpp>
Public Functions
| Name | |
|---|---|
| void | set(uint64_t value) |
| void | rollbackEpoch() Rollback to epoch baseline. |
| void | reset() |
| void | increment(uint64_t delta =1) |
| uint64_t | get() const |
| uint64_t | epochDelta() const Increment since last commit. |
| void | commitEpoch() Commit current value as the epoch baseline. |
| SimpleCounter() =default |
Detailed Description
class chronon::observe::SimpleCounter;
Lightweight single-threaded counter (~1-2ns increment).
Plain uint64_t with epoch support for speculative-execution rollback. Primary counter type for single-threaded tick-based simulation.
Public Functions Documentation
function set
inline void set(
uint64_t value
)
function rollbackEpoch
inline void rollbackEpoch()
Rollback to epoch baseline.
function reset
inline void reset()
function increment
inline void increment(
uint64_t delta =1
)
function get
inline uint64_t get() const
function epochDelta
inline uint64_t epochDelta() const
Increment since last commit.
function commitEpoch
inline void commitEpoch()
Commit current value as the epoch baseline.
function SimpleCounter
SimpleCounter() =default
Updated on 2026-05-26 at 05:42:33 +0000