#include #include #define STR_LEN 10 typedef char fixed_string[STR_LEN+1]; static const char * gen_str() { static fixed_string s; for (size_t i = 0; i < sizeof(fixed_string)-1; ++i) { s[i] = rand() % 25 + 65; } s[sizeof(s)-1] = '\0'; return s; } static std::chrono::time_point get_time () { return std::chrono::high_resolution_clock::now(); } template std::chrono::microseconds time_diff (const T& begin, const T& end) { return std::chrono::duration_cast(end - begin); }