MCPcopy Create free account
hub / github.com/JayXon/Leanify / PrintSize

Function PrintSize

main.cpp:23–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21using std::string;
22
23void PrintSize(size_t size)
24{
25 if (size < 1024)
26 {
27 cout << size << " B";
28 }
29 else if (size < 1024 * 1024)
30 {
31 cout << size / 1024.0 << " KB";
32 }
33 else
34 {
35 cout << size / 1024.0 / 1024.0 << " MB";
36 }
37}
38
39
40#ifdef _WIN32

Callers 1

ProcessFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected