PHPackages                             candasm/hypno - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. candasm/hypno

ActiveLibrary[Testing &amp; Quality](/categories/testing)

candasm/hypno
=============

Delay execution commands package which covers sleep, usleep, time\_nanosleep and time\_sleep\_until functions. This package useful for unit tests.

1.0.0(5y ago)01.2kMITPHPPHP &gt;=5.6

Since Nov 9Pushed 5y ago1 watchersCompare

[ Source](https://github.com/candasm/hypno)[ Packagist](https://packagist.org/packages/candasm/hypno)[ RSS](/packages/candasm-hypno/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Hypno (Delay execution package for PHP)
=======================================

[](#hypno-delay-execution-package-for-php)

Hypno is a wrapper of [PHP delay execution commands](https://www.php.net/manual/en/function.sleep.php) package. This package created to write less complex unit test when delaying methods used in the application logic.

[![Image of Hypno](./assets/hypno.gif)](./assets/hypno.gif)

[![Travis (.org)](https://camo.githubusercontent.com/57e4a587ddc8b1e34e29a5c4d32bc4c18a044ea581eb662c141881c9df27bcfd/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f63616e6461736d2f6879706e6f)](https://camo.githubusercontent.com/57e4a587ddc8b1e34e29a5c4d32bc4c18a044ea581eb662c141881c9df27bcfd/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f63616e6461736d2f6879706e6f)[![Coverage Status](https://camo.githubusercontent.com/f970597539a7fbdb73453bc570809a2c8bc6bf21f50eb45006f3b9a42c64b355/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f63616e6461736d2f6879706e6f2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/candasm/hypno?branch=master)[![Packagist PHP Version Support](https://camo.githubusercontent.com/3b9c62af5da657e517f7c67c756b38461ab10ce51e8e5187579f1bff450360c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f63616e6461736d2f6879706e6f)](https://camo.githubusercontent.com/3b9c62af5da657e517f7c67c756b38461ab10ce51e8e5187579f1bff450360c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f63616e6461736d2f6879706e6f)

Installation
------------

[](#installation)

```
$ composer require candasm/hypno
```

Basic Usage
-----------

[](#basic-usage)

Package covers sleep, usleep, time\_nanosleep and time\_sleep\_until functions. Camelcased methods can be seen on [Hypnotize](./src/Hypnotize.php) interface.

```
