MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / buildTimeInfo

Method buildTimeInfo

src/thundersvm/util/log.cpp:1148–1172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1146 }
1147
1148 struct ::tm* DateTime::buildTimeInfo(struct timeval* currTime, struct ::tm* timeInfo) {
1149#if ELPP_OS_UNIX
1150 time_t rawTime = currTime->tv_sec;
1151 ::elpptime_r(&rawTime, timeInfo);
1152 return timeInfo;
1153#else
1154# if ELPP_COMPILER_MSVC
1155 ELPP_UNUSED(currTime);
1156 time_t t;
1157# if defined(_USE_32BIT_TIME_T)
1158 _time32(&t);
1159# else
1160 _time64(&t);
1161# endif
1162 elpptime_s(timeInfo, &t);
1163 return timeInfo;
1164# else
1165 // For any other compilers that don't have CRT warnings issue e.g, MinGW or TDM GCC- we use different method
1166 time_t rawTime = currTime->tv_sec;
1167 struct tm* tmInf = elpptime(&rawTime);
1168 *timeInfo = *tmInf;
1169 return timeInfo;
1170# endif // ELPP_COMPILER_MSVC
1171#endif // ELPP_OS_UNIX
1172 }
1173
1174 char* DateTime::parseFormat(char* buf, std::size_t bufSz, const char* format, const struct tm* tInfo,
1175 std::size_t msec, const base::SubsecondPrecision* ssPrec) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected