Skip to content

kraenzle-ritter/timelogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timelogger

Latest Stable Version Total Downloads Latest Unstable Version License

This is a more professional way: https://symfony.com/doc/current/components/stopwatch.html

However for the ease of logging (including the method´s name), I will leave this package available.

Installation

$ composer require kraenzle-ritter/timelogger

Usage

$stopwatch = TimeLogger::start();
  ...
$stopwatch->logTime('elapsed'); // named
  ...
$stopwatch->logTime();

logTime() can take 2 parameters: a name, and a minimum of seconds, so that only if the time is greater than this minimum, the method will log.