1
0
mirror of synced 2025-04-21 22:25:55 +03:00

Update calculation formula for progress percentage (#386)

This commit is contained in:
Aristo Chen 2020-03-15 20:29:27 +08:00 committed by GitHub
parent e1acb949e7
commit ac18b70a0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -362,7 +362,7 @@ std::shared_ptr<httplib::Response> res =
cli.Get("/", [](uint64_t len, uint64_t total) {
printf("%lld / %lld bytes => %d%% complete\n",
len, total,
(int)((len/total)*100));
(int)(len*100/total));
return true; // return 'false' if you want to cancel the request.
}
);