Download the PHP package shawnlindstrom/laravel-timer without Composer
On this page you can find all versions of the php package shawnlindstrom/laravel-timer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shawnlindstrom/laravel-timer
More information about shawnlindstrom/laravel-timer
Files in shawnlindstrom/laravel-timer
Package laravel-timer
Short Description Simple high-resolution monotonic timer
License MIT
Homepage https://github.com/shawnlindstrom/laravel-timer
Informations about the package laravel-timer
Laravel Timer
A modern, high-resolution monotonic timer for Laravel applications. Perfect for benchmarking, performance measurement, and precise timing operations.
Features
- 🚀 High-resolution timing using
hrtime() - ⏱️ Multiple time units (seconds, milliseconds, microseconds, nanoseconds)
- 🎯 Type-safe with PHP 8.3+ enums
- 📊 Laravel service provider & facade support
- ✅ 90%+ test coverage
- 🔒 Strict types throughout
Requirements
- PHP 8.3 or higher
- Laravel 12.x
Installation
Install via Composer:
The package will automatically register itself via Laravel's package discovery.
Usage
Basic Usage
Different Time Units
Using the Facade
Alias Usage
If you prefer, you can use the pre-configured alias:
Reusable Measurements
The timer can be reused for multiple measurements:
Testing
Run the test suite:
Generate code coverage report:
Run static analysis:
Format code:
Change Log
Please see CHANGELOG.md for more information on what has changed recently.
Contributing
Please see CONTRIBUTING.md for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Shawn Lindstrom
- All Contributors
License
The MIT License (MIT). Please see LICENSE.md for more information.