Login   Register  
PHP Classes
elePHPant
Icontem

setTimeout and setInterval: Call a function after a period of time

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Sam Shull
Name: Sam Shull <contact>
Classes: 9 packages by
Country: United States United States
Age: 38
All time rank: 36940 in United States United States
Week rank: 306 Up33 in United States United States Up
Innovation award
Innovation award
Nominee: 8x


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class can be used to make PHP call a function after a period of time.

It can register one or more callback functions that should be called after a given timeout value or every time after a given period of time elapses.

The class registers a single callback function to handle PHP tick calls. That function takes care of calling all registered timer callback functions.

  Classes of Sam Shull  >  setTimeout and setInterval  >  Download Download .zip .tar.gz  >  Support forum Support forum (1)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: setTimeout and setInterval
Base name: callback_timers
Description: Call a function after a period of time
Version: 0.5
PHP version: 5.0
License: MIT/X Consortium License
All time users: 1316 users
All time rank: 2714
Week users: 2 users
Week rank: 856 Up
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Time and Date Time and date values, formats and conversion View top rated classes
Group folder image Language Constructs to assist in the language control View top rated classes


  Innovation Award  
PHP Programming Innovation award nominee
August 2009
Number 7


Prize: One downloadable e-book of choice by O'Reilly
Some applications have scripts that need to execute tasks that take a long time to execute.

In some cases, it is convenient to execute code periodically during the execution of such long tasks, like for instance to update information about the tasks' progress.

This class provides a generic solution for regularly calling application defined code during the execution of a long task.

Manuel Lemos

  User ratings  
Not enough user ratings

  Applications that use this package  
No pages of applications that use this class were specified.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Accessible without login Plain text file Timers.class.php Class The class and function definition file
Accessible without login Plain text file Timers_test.php Example An example of how the timers are implemented and used.
Accessible without login Plain text file Timers_test2.php Example An additional portion of the example
Accessible without login Plain text file Timers_test3.php Example An additional portion of the example

Install with Composer Install with Composer - Download Download all files: callback_timers.tar.gz callback_timers.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.