| 1100 | } |
| 1101 | |
| 1102 | double printTime_strftime_wConversion() { |
| 1103 | int count = 1000000; |
| 1104 | char buffer[1000]; |
| 1105 | |
| 1106 | std::time_t result = std::time(nullptr); |
| 1107 | |
| 1108 | uint64_t start = Cycles::rdtsc(); |
| 1109 | for (int i = 0; i < count; i++) { |
| 1110 | std:tm *tm = localtime(&result); |
| 1111 | strftime(buffer, 1000, "%y/%m/%d %H:%M:%S", tm); |
| 1112 | } |
| 1113 | uint64_t stop = Cycles::rdtsc(); |
| 1114 | discard(&buffer); |
| 1115 | |
| 1116 | return Cycles::toSeconds(stop - start)/count; |
| 1117 | } |
| 1118 | |
| 1119 | // Measure the cost of cpuid |
| 1120 | double serialize() { |