MCPcopy Create free account
hub / github.com/alibaba/MNN / GetCurrentTimeAsString

Function GetCurrentTimeAsString

apps/mnncli/src/mnncli_server.cpp:12–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace mnncli {
11
12std::string GetCurrentTimeAsString() {
13 // Get the current time since epoch
14 auto now = std::chrono::system_clock::now();
15 auto duration = now.time_since_epoch();
16 auto seconds = std::chrono::duration_cast<std::chrono::seconds>(duration).count();
17
18 // Convert to string
19 return std::to_string(seconds);
20}
21
22bool FromJson(const json& j, PromptItem& item) {
23 if (!j.is_object()) {

Callers 1

StartMethod · 0.70

Calls 2

to_stringFunction · 0.50
countMethod · 0.45

Tested by

no test coverage detected