add ToHumanReadableSize, which formats data sizes into MiB, GiB, etc.

this is needed in order to display data sizes in upcoming changes
related to tracking statistics about the server's performance
This commit is contained in:
Lion Kortlepel committed 2022-11-23 09:34:49 +01:00
1 parent 6842dccfc3
commit 692129cb81
2 files changed
+17

No files matched your search

+3
View File
@@ -178,6 +178,7 @@ void RegisterThread(const std::string& str);
#define KB 1024llu
#define MB (KB * 1024llu)
#define GB (MB * 1024llu)
#define TB (GB * 1024llu)
#define SSU_UNRAW SECRET_SENTRY_URL
#define _file_basename std::filesystem::path(__FILE__).filename().string()
@@ -352,3 +353,5 @@ inline T DeComp(const T& Compressed) {
std::string GetPlatformAgnosticErrorString();
#define S_DSN SU_RAW
std::string ToHumanReadableSize(size_t Size);