PHPackages                             crysalead/code - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. crysalead/code

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

crysalead/code
==============

Runs callables with a timeout

2.0.0(10y ago)07.4k1MITPHPPHP &gt;=5.5

Since Oct 12Pushed 9y ago2 watchersCompare

[ Source](https://github.com/crysalead/code)[ Packagist](https://packagist.org/packages/crysalead/code)[ RSS](/packages/crysalead-code/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (6)Used By (0)

Code - Runs callables with a timeout.
=====================================

[](#code---runs-callables-with-a-timeout)

[![Build Status](https://camo.githubusercontent.com/f876bf31620047433f4f8e405112758a6b0e6a97b1bb339b5fee8f2f61321ccf/68747470733a2f2f7472617669732d63692e6f72672f63727973616c6561642f636f64652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/crysalead/code) [![Code Coverage](https://camo.githubusercontent.com/0862f7cb147a846d7794c20f714792f57e2c05d844aa59bb3bbc778653ddcfa0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f63727973616c6561642f636f64652f6261646765732f636f7665726167652e706e673f733d35306233633536626436326536613134633163313562376337663563323635383466663262663761)](https://scrutinizer-ci.com/g/crysalead/code/)

API
---

[](#api)

Runs a callable until a timeout is reached:

```
declare(ticks = 1);

Code::run(function(){
    sleep(100);
}, 10);
```

Runs a callable in loop until a timeout is reached and the return value is `false`:

```
// declare(ticks = 1); is optionnal when the callable is not blocking on spinning mode

Code::spin(function(){
    sleep(1);
    return false;
}, 10);
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Total

5

Last Release

3863d ago

Major Versions

1.1.1 → 2.0.02015-12-06

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1306941?v=4)[Simon JAILLET](/maintainers/jails)[@jails](https://github.com/jails)

---

Top Contributors

[![jails](https://avatars.githubusercontent.com/u/1306941?v=4)](https://github.com/jails "jails (8 commits)")

---

Tags

timeout

### Embed Badge

![Health badge](/badges/crysalead-code/health.svg)

```
[![Health](https://phpackages.com/badges/crysalead-code/health.svg)](https://phpackages.com/packages/crysalead-code)
```

###  Alternatives

[barrelstrength/sprout-forms

Simple, beautiful forms. 100% control.

1888.9k4](/packages/barrelstrength-sprout-forms)[vohof/transmission

Awesome PHP JSON-RPC client library for Transmission

181.7k](/packages/vohof-transmission)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
