Releases: anglesoft/chrono
Releases · anglesoft/chrono
php8.0 compatibility
v1.0.4 php8.0 support
Added the describe method.
If you are running many benchmarks, it may be a good idea to add a description to them:
Chrono::describe('Query with joints');
Chrono::start();
// Run the query
print Chrono::meter();
Output:
Query with joints | 1.43 seconds (1424 ms)
Warning: if you prefer to use the shorthand benchmark method, make sure to call the describe method within your benchmark:
Chrono::benchmark(function () {
Chrono::describe('Task');
// Do your thing
});
You need to do this because all internal values are cleared out upon a new benchmark call.
Added the benchmark method.
The benchmark method allows a shorthand synthax that I hope will be much appreciated.
Minor change
Based on feedback from a fellow PHP developer, changed the now() method to simpler microtime(true).
First release
v1.0.0 Update README.md