2017 © Pedro Peláez
 

library stimer

React-Eventloop compatible pausable timer.

image

421p/stimer

React-Eventloop compatible pausable timer.

  • Thursday, April 12, 2018
  • by 421p
  • Repository
  • 1 Watchers
  • 1 Stars
  • 337 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Stimer, a timer with pause/resume feature.

And immediately proceed to the samples:, (*1)

Regular timer:, (*2)

$loop = Factory::create();
$interval = 5;

$timer = new Timer($loop, $interval, function () { echo 'hello world'; });

// ... 3 seconds

$timer->pause();
$timer->getLeftInterval(); // ~ 2 seconds

// ... something happens

$timer->resume();

// ... 2 seconds

// hello world

Periodic timer:, (*3)

$loop = Factory::create();
$interval = 5;

$timer = new PeriodicTimer($loop, $interval, function () { echo 'hello world'; });

// ... 3 seconds

$timer->pause();
$timer->getLeftInterval(); // ~ 2 seconds

// ... something happens

$timer->resume();

// ... 2 seconds

// hello world

// ... 5 seconds

// hello world

The Versions

12/04 2018

dev-master

9999999-dev

React-Eventloop compatible pausable timer.

  Sources   Download

MIT

The Requires

 

by Avatar 421p

12/04 2018

0.2

0.2.0.0

React-Eventloop compatible pausable timer.

  Sources   Download

MIT

The Requires

 

by Avatar 421p

21/08 2017

0.1.2

0.1.2.0

React-Eventloop compatible pausable timer.

  Sources   Download

MIT

The Requires

 

by Avatar 421p

10/07 2017

0.1.1

0.1.1.0

React-Eventloop compatible pausable timer.

  Sources   Download

MIT

The Requires

 

by Avatar 421p

10/07 2017

0.1

0.1.0.0

React-Eventloop compatible pausable timer.

  Sources   Download

MIT

The Requires

 

by Avatar 421p