EventHandler(int line = __builtin_LINE(), const char* filename = __builtin_FILE(), const char* function = __builtin_FUNCTION(), std::chrono::high_resolution_clock::time_point start_time = std::chrono::high_resolution_clock::now()) : line(line)
{
this->start_time = start_time;
previous_store_clear_cnt = store::store_clear_cnt;
this->filename = filename;
this->function = function;
while (store::write_events_locked) {}
register_event();
}
start_time should be initialized at the end of the constructor (after register_event) in order to exclude time spent in bookkeeping from measured time.
Thanks to Ben Craig for pointing this out to me while discussing my benchmark results.
start_time should be initialized at the end of the constructor (after register_event) in order to exclude time spent in bookkeeping from measured time.
Thanks to Ben Craig for pointing this out to me while discussing my benchmark results.