Esempio n. 1
0
function printMsec($time, $warn = 5, $error = 10)
{
    $str = formatMsec($time);
    if (!class_exists('ColorCLI')) {
        return $str;
    }
    $msec = msec($time);
    if ($msec < $warn) {
        return ColorCLI::lightGreen($str);
    } elseif ($msec < $error) {
        return ColorCLI::yellow($str);
    }
    return ColorCLI::red($str);
}