2017 © Pedro Peláez
 

library timer

A simple timer for measuring the speed of a script.

image

speedy/timer

A simple timer for measuring the speed of a script.

  • Monday, July 3, 2017
  • by tkliner
  • Repository
  • 1 Watchers
  • 0 Stars
  • 86 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 12 % Grown

The README.md

Build Status, (*1)

Speedy Timer

Speedy Timer is a package component for script runtime measurement that may be used for debugging applications within system development., (*2)

Requirements

  • >= php 7.1

Installation

$ composer require speedy/timer

Usage

Basic usage for activating the measurement of the runtime script:, (*3)


require_once __DIR__ . '/vendor/autoload.php'; use Speedy\Timer\Timer; $timer = new Timer(); $timer->start(); // some code $item = $timer->stop(); var_dump($item->getTime()); // show run-time in milliseconds var_dump($item->getTime(true)); // show run-time in microseconds

You can use shortcut to create the Timer class instance:, (*4)


require_once __DIR__ . '/vendor/autoload.php'; $timer = timer()->start(); //some code $item = $timer->stop(); var_dump($item->getTime());

To track the duration of different parts of the script it is possible to name each item in the following way:, (*5)


require_once __DIR__ . '/vendor/autoload.php'; $timer = timer()->start('test1'); //some code $timer = timer()->start('test2'); //some code $item = $timer->stop('test1); var_dump($item->getTime()); //some code $item2 = $timer->stop('test2); var_dump($item2->getTime())

The Versions

03/07 2017

dev-master

9999999-dev

A simple timer for measuring the speed of a script.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Tomáš Kliner

03/07 2017

v1.0.x-dev

1.0.9999999.9999999-dev

A simple timer for measuring the speed of a script.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Tomáš Kliner

03/07 2017

v1.0.3

1.0.3.0

A simple timer for measuring the speed of a script.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Tomáš Kliner

03/07 2017

v1.0.2

1.0.2.0

A simple timer for measuring the speed of a script.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Tomáš Kliner

03/07 2017

v1.0.1

1.0.1.0

A simple timer for measuring the speed of a script.

  Sources   Download

The Requires

  • php >=7.1.0

 

The Development Requires

by Tomáš Kliner