2017 © Pedro Peláez
 

library php-timelog

PHP timer for long-time operations

image

demi/php-timelog

PHP timer for long-time operations

  • Monday, January 29, 2018
  • by demi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,072 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 41 % Grown

The README.md

php-timer

PHP timer for long-time operations, (*1)

Installation

Run, (*2)

composer require "demi/php-timelog" "~1.0"

Usage

For any console action:, (*3)

$bigData = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

$allCount = count($bigData);
$timer = new \demi\timelog\TimeLog($allCount);
$timer->showStart();
foreach ($bigData as $item) {
    // some handling start...
    sleep(rand(1, 2));
    // some handling finish...

    $timer->handled++;
    $timer->showStatus(3); // 3 - how often show status message
}
$timer->showFinish();

Output:, (*4)

Starting handling: 10 items
Handled:  3/10  Remaining: 00:00:09     Speed: 0.74/sec
Handled:  6/10  Remaining: 00:00:05     Speed: 0.74/sec
Handled:  9/10  Remaining: 00:00:01     Speed: 0.75/sec

Finished after 00:00:14 Handled: 10 items

The Versions

29/01 2018

dev-master

9999999-dev https://github.com/demisang/php-timelog#readme

PHP timer for long-time operations

  Sources   Download

GNU GPL-3.0-or-later

The Requires

  • php >=5.3.0

 

log php timer duration

13/03 2017

1.0.1

1.0.1.0 https://github.com/demisang/php-timelog#readme

PHP timer for long-time operations

  Sources   Download

GNU

The Requires

  • php >=5.3.0

 

log php timer

17/05 2016

1.0.0

1.0.0.0 https://github.com/demisang/php-timelog#readme

PHP timer for long-time operations

  Sources   Download

GNU

The Requires

  • php >=5.3.0

 

log php timer