Did some testing. Now able to finish new daemon communication

This commit is contained in:
Marcel Baumgartner
2023-06-07 03:29:36 +02:00
parent f11eef2734
commit 94b8f07d92
3 changed files with 11 additions and 2 deletions

View File

@@ -116,4 +116,12 @@ public static class Formatter
return (i / (1024D * 1024D)).Round(2) + " GB";
}
}
public static double BytesToGb(long bytes)
{
const double gbMultiplier = 1024 * 1024 * 1024; // 1 GB = 1024 MB * 1024 KB * 1024 B
double gigabytes = (double)bytes / gbMultiplier;
return gigabytes;
}
}