mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Use league/climate in ColorCLI class
This commit is contained in:
@@ -21,7 +21,7 @@ $res = $pdo->query(
|
||||
)
|
||||
);
|
||||
if ($res instanceof \Traversable) {
|
||||
echo ColorCLI::header('Updating console info for '.number_format($res->rowCount()).' releases.');
|
||||
ColorCLI::header('Updating console info for '.number_format($res->rowCount()).' releases.');
|
||||
|
||||
foreach ($res as $arr) {
|
||||
$starttime = microtime(true);
|
||||
@@ -29,14 +29,14 @@ if ($res instanceof \Traversable) {
|
||||
if ($gameInfo !== false) {
|
||||
$game = $console->updateConsoleInfo($gameInfo);
|
||||
if ($game === false) {
|
||||
echo ColorCLI::primary($gameInfo['release'].' not found');
|
||||
ColorCLI::primary($gameInfo['release'].' not found');
|
||||
}
|
||||
}
|
||||
|
||||
// amazon limits are 1 per 1 sec
|
||||
$diff = floor((microtime(true) - $starttime) * 1000000);
|
||||
if (1000000 - $diff > 0) {
|
||||
echo ColorCLI::alternate('Sleeping');
|
||||
ColorCLI::alternate('Sleeping');
|
||||
usleep(1000000 - $diff);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user