9 int const power[] = {1000 * 1000, 100 * 1000, 10 * 1000, 1000, 100, 10, 1};
19 auto us = std::chrono::duration_cast<std::chrono::microseconds>(
tp.time_since_epoch()).
count();
20 tv_.tv_sec = us / 1000000;
21 tv_.tv_usec = us % 1000000;
26 gettimeofday(&tv,
nullptr);
31 auto oldflags = os.flags();
32 auto oldfill = os.fill();
34 localtime_r(&tod.
tv_.tv_sec, &timebuf);
35 typedef std::ostreambuf_iterator<char, std::char_traits<char> > Iter;
36 std::time_put<char, Iter>
const&
tp = std::use_facet<std::time_put<char, Iter> >(std::locale());
40 char const pattern[] =
"%d-%b-%Y %H:%M:%S %Z";
43 char const pattern[] =
"%d-%b-%Y %H:%M:%S.";
47 tp.put(begin, os,
' ', &timebuf,
'Z');