mvan/stopwatch
Composer 安装命令:
composer require mvan/stopwatch
包简介
Stop Watch for measuring running time of the script
关键字:
README 文档
README
StopWatch - measures time inside the scripts
This library is a super simple to tool for measuring time between two points in the script.
Setup
Add the library to your composer.json file in your project:
{ "require": { "mvan/stopwatch": "1.*" } }
Use composer to install the library:
$ php composer.phar install
Composer will install CLItoris inside your vendor folder. Then you can add the following to your .php files to use the library with Autoloading.
require_once __DIR__ . '/vendor/autoload.php';
Alternatively, use composer on the command line to require and install CLItoris:
$ php composer.phar require mvan/stopwatch:1.*
Minimum Requirements
- PHP 7
Usage
<?php $sw = new StopWatch(); // Set a start point in time $sw->start(); sleep(30); // Stop measuring time $sw->stop(); // Show results print $sw->getResult().PHP_EOL; print $sw->getResult(StopWatch::IN_SECONDS).PHP_EOL; print $sw->getResult(StopWatch::IN_MINUTES).PHP_EOL;
统计信息
- 总下载量: 29
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-16