11 const std::string& description)
13 description_(description) {
30 time_t seconds =
static_cast<time_t
>(nanoseconds / 1000000000);
32 gmtime_r(&seconds, ×tamp);
33 char seconds_buffer[32];
34 strftime(seconds_buffer,
sizeof(seconds_buffer),
35 "generic-%Y-%m-%dT%H:%M:%S", ×tamp);
38 unsigned offset_milliseconds = ((nanoseconds / 1000000) % 1000);
40 snprintf(name_buffer,
sizeof(name_buffer),
"%s.%03dZ", seconds_buffer,
43 name_ = std::string(name_buffer);
bool HasPrefix(const string &str, const string &prefix, const bool ignore_case)