This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
#include <iomanip> | |
#include <iostream> | |
string getTimestamp() { | |
// get a precise timestamp as a string | |
const auto now = std::chrono::system_clock::now(); | |
const auto nowAsTimeT = std::chrono::system_clock::to_time_t(now); | |
const auto nowMs = std::chrono::duration_cast<std::chrono::milliseconds>( | |
now.time_since_epoch()) % 1000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// System Timer Granularity Analysis | |
// Developed by: Brandon C. Schlinker (Inbound5 / Develop5) | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <inttypes.h> | |
#include <signal.h> | |
#include <sched.h> | |
#include <unistd.h> |