MCPcopy Create free account
hub / github.com/davisking/dlib / name_buf

Function name_buf

dlib/timing.h:86–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84 }
85
86 inline char* name_buf(int i, const char* name)
87 {
88 static char buf[TIME_SLOTS][NAME_LENGTH] = {{0}};
89 // if this name buffer is empty then copy name into it
90 if (buf[i][0] == '\0')
91 {
92 std::strncpy(buf[i], name, NAME_LENGTH-1);
93 buf[i][NAME_LENGTH-1] = '\0';
94 }
95 // return the name buffer
96 return buf[i];
97 }
98
99 inline uint64_t ts()
100 {

Callers 3

startFunction · 0.85
printFunction · 0.85
clearFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected