MCPcopy Create free account
hub / github.com/SmingHub/Sming / unitToString

Function unitToString

Sming/Core/NanoTime.cpp:20–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18namespace NanoTime
19{
20const char* unitToString(Unit unit)
21{
22 switch(unit) {
23 case Nanoseconds:
24 return "ns";
25 case Microseconds:
26 return "us";
27 case Milliseconds:
28 return "ms";
29 case Seconds:
30 return "s";
31 case Minutes:
32 return "m";
33 case Hours:
34 return "h";
35 case Days:
36 return "d";
37 default:
38 return "?s";
39 }
40}
41
42const char* unitToLongString(Unit unit)
43{

Callers 2

printMethod · 0.85
toStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected