MCPcopy Create free account
hub / github.com/TheOfficialFloW/VitaShell / getSizeString

Function getSizeString

utils.c:321–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321void getSizeString(char string[16], uint64_t size) {
322 double double_size = (double)size;
323
324 int i = 0;
325 static char *units[] = { "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
326 while (double_size >= 1024.0) {
327 double_size /= 1024.0;
328 i++;
329 }
330
331 snprintf(string, 16, "%.*f %s", (i == 0) ? 0 : 2, double_size, units[i]);
332}
333
334void convertUtcToLocalTime(SceDateTime *time_local, SceDateTime *time_utc) {
335 SceRtcTick tick;

Callers 5

checkMemoryCardFreeSpaceFunction · 0.85
qr_scan_threadFunction · 0.85
info_threadFunction · 0.85
initPropertyDialogFunction · 0.85
browserMainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected