diff --git a/docs b/docs index 087d1055..135f3110 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 087d105504aedc9eda89660f8cbc3842f116f573 +Subproject commit 135f3110232f3a486b83438fdc0f15db165f7494 diff --git a/src/danog/MadelineProto/MTProtoTools/Files.php b/src/danog/MadelineProto/MTProtoTools/Files.php index 0a58eda6..d29eca5b 100644 --- a/src/danog/MadelineProto/MTProtoTools/Files.php +++ b/src/danog/MadelineProto/MTProtoTools/Files.php @@ -277,10 +277,12 @@ trait Files $ctx = \hash_init('md5'); $promises = []; - $cb = function () use ($cb, $part_total_num) { + $speed = 0; + $time = 0; + $cb = function () use ($cb, $part_total_num, &$speed, &$time) { static $cur = 0; $cur++; - \danog\MadelineProto\Tools::callFork($cb($cur * 100 / $part_total_num)); + \danog\MadelineProto\Tools::callFork($cb($cur * 100 / $part_total_num, $speed, $time)); }; $start = \microtime(true); @@ -1155,10 +1157,12 @@ trait Files } $count = \count($params); - $cb = function () use ($cb, $count) { + $time = 0; + $speed = 0; + $cb = function () use ($cb, $count, &$time, &$speed) { static $cur = 0; $cur++; - \danog\MadelineProto\Tools::callFork($cb($cur * 100 / $count)); + \danog\MadelineProto\Tools::callFork($cb($cur * 100 / $count, $time, $speed)); }; $cdn = false;