astatroth/laravel-timer

A small tool to measure operations execution time.

Installs: 23 480

Dependents: 0

Suggesters: 0

Security: 0

Stars: 8

Watchers: 2

Forks: 5

Open Issues: 1

pkg:composer/astatroth/laravel-timer

dev-master 2018-08-13 07:20 UTC

This package is auto-updated.

Last update: 2025-10-21 04:18:03 UTC


README

Total Downloads

A small tool to measure operations execution time.

Installation

composer require "astatroth/laravel-timer":"dev-master"

Add the service provider ...

Astatroth\LaravelTimer\LaravelTimerServiceProvider::class,

or if you use Lumen

Astatroth\LaravelTimer\LumenTimerServiceProvider::class,

... and facade:

'Timer' => Astatroth\LaravelTimer\Timer::class,

Usage

Just start the Timer with

Timer::timerStart('timer-name');

If you start and stop the same timer multiple times, the measured intervals will be accumulated.

Reading specified timer current time:

Timer::timerRead('timer-name);

Stop the timer:

Timer::timerStop('timer-name');

Have fun! ;)