innmind/time-warp

This package is abandoned and no longer maintained. The author suggests using the innmind/time package instead.

Time warp

Installs: 99 893

Dependents: 7

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

pkg:composer/innmind/time-warp

5.1.0 2026-01-18 09:10 UTC

This package is auto-updated.

Last update: 2026-01-18 09:11:58 UTC


README

Build Status codecov Type Coverage

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 */);