parallel resource downloading

This commit is contained in:
Nordup 2024-12-07 13:49:51 +04:00
parent fb587a6d30
commit fe5244d458
11 changed files with 116 additions and 40 deletions

View file

@ -16,3 +16,14 @@ static func to_alpha(text: String) -> String:
result = result.strip_edges()
return result
static func bytes_to_string(bytes: int) -> String:
if bytes < 1024: return str(bytes) + "B"
var kb = bytes / 1024
if kb < 1024: return str(kb) + "KB"
var mb = kb / 1024.0
var text = "%.1fMB" if mb < 10.0 else "%.0fMB"
return text % [mb]