54 bool synchronized =
false;
68 template <
typename... Args>
71 static_assert((
isOptionsTag<Args> && ...),
"The Event only accepts tags as arguments.");
73 (options.
handle(args), ...);
77 template <
typename... Args>
Event(std::string_view eventName, Args... args)
void start()
Starts or restarts a stopped event.
void stop()
Stops a running event.
Event & operator=(const Event &)=delete
constexpr Options optionsFromTags(Args... args)
Event & operator=(Event &&)=default
std::string name
Name used to identify the timer. Events of the same name are accumulated to.
Event(std::string_view eventName, Args... args)
std::chrono::steady_clock Clock
Default clock type. All other chrono types are derived from it.
~Event()
Stops the event if it's running and report its times to the EventRegistry.
Event(const Event &other)=delete
void addData(std::string_view key, int value)
Adds named integer data, associated to an event.
contains profiling utilities.
static constexpr Group API
Convenience instance of the Cat::API.
static constexpr bool isOptionsTag
Group
Tag to annotate event group.
static constexpr SynchronizeTag Synchronize
Convenience instance of the SynchronizeTag.
static constexpr Group Fundamental
Convenience instance of the Cat::Fundamental.
void handle(SynchronizeTag)
Tag to annotate synchronized events.