2017 © Pedro Peláez
 

library wall-timer

Simple library for count script execution time

image

bita-sk/wall-timer

Simple library for count script execution time

  • Monday, January 29, 2018
  • by bitask
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Wall Timer

, (*1)

Script run time measurement library

  • support three languages for output text czech, english, german, russian
  • include unit tests
  • the option to set the output display
  • include autoload class for non-use composer

Default

  • language -> english
  • echo output -> true
  • time output -> seconds

Usage

  /* Init wall timer */
  $wallTimer = new WallTimer();

  /* Begin measuring */
  $wallTimer->start()

  /* Script to be measured  */
  sleep(2);

 /* End measuring */
  $wallTimer->end()
Output:

Your script running 2 seconds, (*2)

Result time of measuring
 // Time output in minutes
 $wall->getTotalTime();
Change language
 // Set czech language
 $wall->setOutputLanguage("cs");

- ru - for russian - cs - for czech - en - for english, (*3)

Result rounding
 $wall->setOutputPrecision(10);
Output:

Your script running 2.0001149178 seconds, (*4)

Change time output
// Time output in minutes
 $wall->setTimeOutput("m");

- s - for seconds - m - for minutes - h - for hours, (*5)

Turn off echo output
// Time output in minutes
 $wall->setAllowEchoOutput(false);

The Versions

29/01 2018

dev-master

9999999-dev

Simple library for count script execution time

  Sources   Download

MIT

The Requires

 

The Development Requires

by Radek Bittner

29/01 2018

1.0.0

1.0.0.0

Simple library for count script execution time

  Sources   Download

MIT

The Requires

 

The Development Requires

by Radek Bittner