承接 markuszeller/php-timer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

markuszeller/php-timer

Composer 安装命令:

composer require markuszeller/php-timer

包简介

Simple Timer Class

README 文档

README

Simple Timer Class

PHP from Packagist Install with Composer)

Init a timer

$timer = new Timer();

Do something what takes some time and stop the timer.

$timer->stop();

Assuming the timer took 66.6 seconds for the do-something operations.

Receive the values in different formats:

  • Fractioned with 2 decimals

    // 66.60
    echo $timer->getSecondsFractioned();
    
  • Rounded as an integer

    // 67
    echo $timer->getSecondsRounded();  
    
  • Formatted as time hh:mm:ss

    // 00:01:06
    echo $timer->getTimeFormatted();
    
  • Formatted as milliseconds

    // 5000.1788139343
    sleep(5);
    echo $timer->getMilliseconds();
    
  • Different outputs

$timer->setTotal(100);
$timer->setDone(88);

// █████████████████░░░
// 20 chars are default
echo $timer->getProgressAsciiBar(), PHP_EOL;

//  88.00%
echo $timer->getProgressPercentage(), PHP_EOL;

// 88/100
echo $timer->getProgressDone(), PHP_EOL;
  • You can also define your own output

    • %b - Progress bar
    • %c - Count
    • %p - Percentage

    %c %b %p will print
    567/1234 █████████░░░░░░░░░░░ 45.95%

统计信息

  • 总下载量: 47
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固