source code to the dll:
#include <chrono>
#include <vector>
std::chrono::time_point<std::chrono::high_resolution_clock> start = std::chrono::high_resolution_clock::now();
std::chrono::time_point<std::chrono::high_resolution_clock> end = std::chrono::high_resolution_clock::now();
std::chrono::high_resolution_clock myclock;
#ifdef _WIN32
#define DLLEXPORT extern "C" __declspec(dllexport) __attribute__((visibility("default")))
#else
#define DLLEXPORT extern "C" __attribute__((visibility("default")))
#endif
DLLEXPORT double get_us()
{
end = myclock.now();
return std::chrono::duration_cast<std::chrono::microseconds>(end - start).count();
}