innmind / time-warp
Time warp
Installs: 99 893
Dependents: 7
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
pkg:composer/innmind/time-warp
Requires
- php: ~8.4
- innmind/time: ~1.0
Requires (Dev)
- innmind/black-box: ~6.1
- innmind/coding-standard: ~2.0
- innmind/static-analysis: ~1.3
- innmind/time-continuum: ~5.1
This package is auto-updated.
Last update: 2026-01-18 09:11:58 UTC
README
Small library to abstract the way to halt the program.
Installation
composer require innmind/time-warp
Usage
use Innmind\TimeWarp\Halt; use Innmind\TimeContinuum\Period; function yourApp(Halt $halt): void { // do something $halt(Period::minute(42))->unwrap(); // do some more } yourApp(Halt::new());
This example will halt your program for 42 minutes.
Logging
use Innmind\TimeWarp\Halt; use Psr\Log\LoggerInterface; $halt = Halt::logger($halt, /** an instance of LoggerInterface */);