13 lines
439 B
C++
13 lines
439 B
C++
#pragma once
|
|
#include <array>
|
|
#include <chrono>
|
|
#include <string>
|
|
|
|
#define duration_ns(a) std::chrono::duration_cast<std::chrono::nanoseconds>(a).count()
|
|
#define perf_counter_ns() std::chrono::high_resolution_clock::now()
|
|
|
|
std::string format_time(uint64_t) noexcept;
|
|
std::string format_time_ns(uint64_t) noexcept;
|
|
std::string format_byte_size(uint64_t) noexcept;
|
|
std::string thousand_sep(uint64_t, const char& = ',') noexcept;
|