jcchavezs/nanotime

An abstraction for nanotime in PHP.

0.4.0 2017-06-12 19:02 UTC

This package is auto-updated.

Last update: 2024-04-04 20:51:16 UTC


README

A couple of value objects for representing nanotime.

Usage

    $nanotime = Nanotime::now();
    usleep(1);
    $nanotime2 = Nanotime::now();
    echo $nanotime2->diff($nanotime);

Further development

This is just a wrapper for the Nanotime concept (which does not exist in PHP) that will perfectly work as an abstraction for nanotime in PHP projects. Further development will tackle the problem about getting an accurate value for nanotime.