PHPackages                             webops/runtime - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. webops/runtime

ActivePackage[Utility &amp; Helpers](/categories/utility)

webops/runtime
==============

Package for mathematics calculations

01PHP

Since Aug 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/MilanC64/Runtime)[ Packagist](https://packagist.org/packages/webops/runtime)[ RSS](/packages/webops-runtime/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

##### Version 0.1

[](#version-01)

---

**Runtime**
===========

[](#runtime)

Runtime class is made for benchmarking purposes. You can modify it or use as you see fit in all your projects commercial or not. You can wrap ti arround functions or methods, or pass it objects or className their methods and arguments and check their runtime.

This class uses bcmath php extension so you must have it installed. You can check this via phpinfo() in the extensions section. Also change the setting of your bcmath.scale = 13 or more in your php.ini because we display floats to 0.0000000000001 accuracy.

---

**How to use it?**

Install it with composer

Add to your composer.json:

```
{
    "minimum-stability": "dev",
    "prefer-stable" : true,
    "require": {
        "webops/runtime": "dev-master"
    }
}
```

and do composer install.

or you can: composer require webops/runtime with having in mind minimum stability which is set to "dev" right now.

---

**Usage:**

1. Inside function or a method: use the `sec()` method

    - Include it where you like,
    - instanciate it with `new Runtime`,
    - set the start and end time with `$instance->setStartTime(microtim  (true))`,
    - and `$instance->setEndTime(microtime(true))`,
    - Then to get runtime do `$runtime->sec()`.
2. From outside of an object: use the `objMethodSec()` method

    - Include it where you like,
    - instanciate it with `new Runtime`,
    - set object with `$runtime->setObject(new YourObject)`,
    - set method with `$runtime->setMethod('yourMethodName')`,
    - set arguments if you have them with `$runtime->setArgs(['array', $of, 'arguments'])`,
    - and finalyrun the `$runtime->objMethodSec()`.
3. Static methods inside a class: use the `staticSec()` method

    - Include it where you like,
    - instanciate it with `new Runtime`,
    - set class with `$runtime->setClass('Fully/Qualified/ClassName')`,
    - set method with `$runtime->setMethod('yourMethodName')`,
    - set arguments if you have them with `$runtime->setArgs(['array', $of, 'arguments'])`,
    - and finaly run the `$runtime->staticSec()`.
4. Methods inside a class : use the `classMethodSec()` method

    - Include it where you like,
    - instanciate it with `new Runtime`,
    - set class with `$runtime->setClass('Fully/Qualified/ClassName')`,
    - set method with `$runtime->setMethod('yourMethodName')`,
    - set arguments if you have them with `$runtime->setArgs(['array', $of, 'arguments'])`,
    - and finaly run the `$runtime->classMethodSec()`.

---

This is basic version and will improve.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f10e04380b0836bf78a015b3fe11a97e9a32dec068c1d9dab76414b6757cd998?d=identicon)[milanc64](/maintainers/milanc64)

### Embed Badge

![Health badge](/badges/webops-runtime/health.svg)

```
[![Health](https://phpackages.com/badges/webops-runtime/health.svg)](https://phpackages.com/packages/webops-runtime)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
