Skip to content

Commit

Permalink
Merge pull request #17 from aidsoul/release/v.1.4.2
Browse files Browse the repository at this point in the history
Close release/v.1.4.2
  • Loading branch information
aidsoul authored Nov 3, 2022
2 parents 30d2612 + 5419a01 commit 3be7417
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions groups/start.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,28 @@
$path = __DIR__ . '/../';
require_once $path . 'vendor/autoload.php';
require_once $path . 'config.php';
if(isset($argv[1])){
Vktote\Bot::start(__DIR__ . '/' . $argv[1] . '/' . GROUP_CONFIG);

$memory = memory_get_usage() - $memory;
$time = microtime(true) - $start;
if (isset($argv[1])) {
if (file_exists(__DIR__ . '/' . $argv[1])) {
Vktote\Bot::start(__DIR__ . '/' . $argv[1] . '/' . GROUP_CONFIG);

$i = 0;
while (floor($memory / 1024) > 0) {
$i++;
$memory /= 1024;
}
$memory = memory_get_usage() - $memory;
$time = microtime(true) - $start;

$name = ['байт', 'КБ', 'МБ'];
$memory = round($memory, 2) . ' ' . $name[$i];
$i = 0;
while (floor($memory / 1024) > 0) {
$i++;
$memory /= 1024;
}

echo $time . ' сек. / ' . $memory;
}else{
$name = ['байт', 'КБ', 'МБ'];
$memory = round($memory, 2) . ' ' . $name[$i];

echo $time . ' сек. / ' . $memory;
} else {
echo 'Config folder not found';
}

} else {
echo 'The argument(Group name) is not set';
}

0 comments on commit 3be7417

Please sign in to comment.