begin tests in core

This commit is contained in:
Shish
2018-11-05 20:53:58 +00:00
parent 5634ba6d97
commit cdfc97d19b
3 changed files with 49 additions and 1 deletions

View File

@ -221,6 +221,8 @@ function parse_shorthand_int(string $limit): int {
* @return string
*/
function to_shorthand_int(int $int): string {
assert($int >= 0);
if($int >= pow(1024, 3)) {
return sprintf("%.1fGB", $int / pow(1024, 3));
}