MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / timestamp

Function timestamp

benchmarks/benchmarks.cpp:1693–1700  ·  view source on GitHub ↗

Returns a formatted timestamp. Returned buffer is only valid until the next call. Not thread-safe.

Source from the content-addressed store, hash-verified

1691// Returned buffer is only valid until the next call.
1692// Not thread-safe.
1693static const char* timestamp()
1694{
1695 static char buf[32];
1696 time_t time = std::time(NULL);
1697 strcpy(buf, std::asctime(std::localtime(&time)));
1698 buf[strlen(buf) - 1] = '\0'; // Remove trailing newline
1699 return buf;
1700}
1701
1702static inline bool isvowel(char ch)
1703{

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected