public static function check($text = "") {
		
		// make sure start time is set
		if (empty(self::$startTime)) {
			Console::writeError("the timer wasn't started...");
		}
		
		// make sure check time is set
		if (empty(self::$checkTime)) {
			self::$checkTime = self::$startTime;
		}
		
		// format any extra text
		$insert = "";
		if (!empty($text)) {
			$insert = "<info>".$text." >> </info>";
		}
		
		// get the current time
		$checkTime = self::getTime();
		
		// get the data for the output
		$totalTime = ($checkTime - self::$startTime);
		$mem       = round((memory_get_peak_usage(true)/1024)/1024,2);
		
		// figure out what tag to show
		$timeTag = "info";
		if (($checkTime - self::$checkTime) > 0.2) {
			$timeTag = "error";
		} else if (($checkTime - self::$checkTime) > 0.1) {
			$timeTag = "warning";
		}
		
		// set the checkTime for the next check comparison
		self::$checkTime = $checkTime;
		
		// write out time/mem stats
		Console::writeLine($insert."currently taken <".$timeTag.">".$totalTime."</".$timeTag."> seconds and used <info>".$mem."MB</info> of memory...");
		
	}
public static function check($text = "") {
		
		// make sure start time is set
		if (empty(self::$startTime)) {
			Console::writeError("the timer wasn't started...");
		}
		
		// make sure check time is set
		if (empty(self::$checkTime)) {
			self::$checkTime = self::$startTime;
		}
		
		// format any extra text
		$insert = "";
		if (!empty($text)) {
			$insert = "<info>".$text." >> </info>";
		}
		
		// get the current time
		$checkTime = self::getTime();
		
		// get the data for the output
		$totalTime = ($checkTime - self::$startTime);
		$mem       = round((memory_get_peak_usage(true)/1024)/1024,2);
		
		// figure out what tag to show
		$timeTag = "info";
		if (($checkTime - self::$checkTime) > 0.2) {
			$timeTag = "error";
		} else if (($checkTime - self::$checkTime) > 0.1) {
			$timeTag = "warning";
		}
		
		// set the checkTime for the next check comparison
		self::$checkTime = $checkTime;
		
		// write out time/mem stats
		Console::writeLine($insert."currently taken <".$timeTag.">".$totalTime."</".$timeTag."> seconds and used <info>".$mem."MB</info> of memory...");
		
	}
public static function check ( $ text = "" ) { // make sure start time is set if ( empty ( self :: $ startTime ) ) { Console :: writeError ( "the timer wasn't started..." ) ; } // make sure check time is set if ( empty ( self :: $ checkTime ) ) { self :: $ checkTime = self :: $ startTime ; } // format any extra text $ insert = "" ; if ( ! empty ( $ text ) ) { $ insert = "<info>" . $ text . " >> </info>" ; } // get the current time $ checkTime = self :: getTime ( ) ; // get the data for the output $ totalTime = ( $ checkTime - self :: $ startTime ) ; $ mem = round ( ( memory_get_peak_usage ( true ) / 1024 ) / 1024 , 2 ) ; // figure out what tag to show $ timeTag = "info" ; if ( ( $ checkTime - self :: $ checkTime ) > 0.2 ) { $ timeTag = "error" ; } else if ( ( $ checkTime - self :: $ checkTime ) > 0.1 ) { $ timeTag = "warning" ; } // set the checkTime for the next check comparison self :: $ checkTime = $ checkTime ; // write out time/mem stats Console :: writeLine ( $ insert . "currently taken <" . $ timeTag . ">" . $ totalTime . "</" . $ timeTag . "> seconds and used <info>" . $ mem . "MB</info> of memory..." ) ; }
Check the current timer
Check the current timer