MCPcopy Create free account
hub / github.com/comaps/comaps / FormatCurrentTime

Function FormatCurrentTime

libs/base/timer.cpp:27–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27std::string FormatCurrentTime()
28{
29 time_t t = time(NULL);
30 std::string s(ctime(&t));
31
32 replace(s.begin(), s.end(), ' ', '_');
33
34 ASSERT_GREATER(s.size(), 1, ());
35 s.resize(s.size() - 1);
36 return s;
37}
38
39uint32_t GenerateYYMMDD(int year, int month, int day)
40{

Callers 1

UNIT_TESTFunction · 0.85

Calls 5

replaceFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.68