MCPcopy Create free account
hub / github.com/78/tenbox / IsoTimestamp

Function IsoTimestamp

src/manager/llm_proxy.cpp:771–784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769}
770
771static std::string IsoTimestamp() {
772 auto now = std::chrono::system_clock::now();
773 auto tt = std::chrono::system_clock::to_time_t(now);
774 auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(
775 now.time_since_epoch()) % 1000;
776 struct tm tm_buf;
777 localtime_s(&tm_buf, &tt);
778 char buf[32];
779 snprintf(buf, sizeof(buf), "%04d-%02d-%02dT%02d:%02d:%02d.%03d",
780 tm_buf.tm_year + 1900, tm_buf.tm_mon + 1, tm_buf.tm_mday,
781 tm_buf.tm_hour, tm_buf.tm_min, tm_buf.tm_sec,
782 static_cast<int>(ms.count()));
783 return buf;
784}
785
786// Extract assistant content from SSE stream (concatenate all delta content pieces).
787static std::string ExtractSseContent(const std::string& sse_raw) {

Callers 1

WriteLogEntryMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected