Example #1
0
 public static function timeItTook($startTime)
 {
     $time = microtime(true) - $startTime;
     $time = number_format($time, 4);
     $time = '[' . $time . 's]';
     self::$lastTimeLenght = strlen($time);
     if ($time < 60) {
         return self::color(self::$date_color, $time);
     }
     $minutes = (int) ($time / 60);
     $seconds = $time - $minutes * 60;
     $time = '[' . $minutes . 'm' . $seconds . 's]';
     self::$lastTimeLenght = strlen($time);
     return self::color(self::$date_color, $time);
 }