ankalagon/eta 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ankalagon/eta

Composer 安装命令:

composer require ankalagon/eta

包简介

Library to count progress and estimated time of arrival

README 文档

README

Service can count priogress and estimated time of arrival (ETA) of a process

Requirements

  • PHP7.1 and above

Installation

Update your composer.json and run composer update

{
    "require": {
        "ankalagon/eta": "^1.0"
    }
}

or execute

composer require ankalagon/eta

Usage

    use Ankalagon\ETA\Eta;

    $eta = new Ankalagon\ETA\Eta($startTime, $allDataToProcess);
    
    //need to pass some time
    echo sprintf('Progress: %s%%, ETA: %s', $eta->getProgress(), $eta->getEta()).PHP_EOL;

Output produce by example script (in Example directory):

Progress: 0.04, ETA: 0h 08m 45s
Progress: 0.05, ETA: 0h 08m 45s
Progress: 0.05, ETA: 0h 08m 36s
Progress: 0.06, ETA: 0h 08m 28s
Progress: 0.07, ETA: 0h 08m 19s
Progress: 0.08, ETA: 0h 08m 12s
Progress: 0.09, ETA: 0h 08m 13s
Progress: 0.10, ETA: 0h 08m 10s
Progress: 0.11, ETA: 0h 08m 03s
Progress: 0.12, ETA: 0h 07m 59s
Progress: 0.13, ETA: 0h 07m 58s
Progress: 0.14, ETA: 0h 07m 56s
Progress: 0.15, ETA: 0h 07m 49s
Progress: 0.16, ETA: 0h 07m 43s
Progress: 0.16, ETA: 0h 07m 40s
Progress: 0.17, ETA: 0h 07m 38s
Progress: 0.18, ETA: 0h 07m 35s
Progress: 0.19, ETA: 0h 07m 31s
Progress: 0.20, ETA: 0h 07m 24s
Progress: 0.21, ETA: 0h 07m 20s

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固