| 374 | } |
| 375 | |
| 376 | void AddEvent(uint32_t event_info) noexcept |
| 377 | { |
| 378 | LOCK(m_events_mutex); |
| 379 | |
| 380 | m_events_hasher.Write((const unsigned char *)&event_info, sizeof(event_info)); |
| 381 | // Get the low four bytes of the performance counter. This translates to roughly the |
| 382 | // subsecond part. |
| 383 | uint32_t perfcounter = (GetPerformanceCounter() & 0xffffffff); |
| 384 | m_events_hasher.Write((const unsigned char*)&perfcounter, sizeof(perfcounter)); |
| 385 | } |
| 386 | |
| 387 | /** |
| 388 | * Feed (the hash of) all events added through AddEvent() to hasher. |
no test coverage detected