Download the PHP package atk14/stop-watch without Composer

On this page you can find all versions of the php package atk14/stop-watch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package stop-watch

StopWatch

A PHP class for precise time measurement.

Basic usage

$s = new StopWatch();

$s->start();
// do something...
$s->stop(); 

// printing result
echo $s->getResult(); // (float) 3.6618700027466
// or
echo $s; // to string conversion provides humanized output, e.g. "0:03.662"

Usual usage

$s = new StopWatch();

$s->start("total");

  $s->start("parsing_request");
  // do something
  $s->stop("parsing_request");

  $s->start("preparing_data");
  // do something
  $s->stop("preparing_data");

  $s->start("rendering");

    // do something

    $s->start("rendering_partial_template");
    // do something
    $s->stop("rendering_partial_template");

    $s->start("rendering_partial_template");
    // do something
    $s->stop("rendering_partial_template");

  $s->stop("rendering");

$s->stop("total");

Print results

echo $s->getResult("total"); // 0.034516096115112
echo $s->getResult("rendering"); // 0.017526865005493

For overal report there is a special method

echo $s->getPrintableOutput();

The output is pretty cool :)

                     total:  0.034516
           parsing_request:  0.004428
            preparing_data:  0.003821
                 rendering:  0.017527
rendering_partial_template:  0.003695
rendering_partial_template:  0.003743
          ----------------: total
                     total x 1:    0.0345s
           parsing_request x 1:    0.0044s
            preparing_data x 1:    0.0038s
                 rendering x 1:    0.0175s
rendering_partial_template x 2:    0.0074s

All versions of stop-watch with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package atk14/stop-watch contains the following files

Loading the files please wait ....