PHP function time_nanosleep()

Availability in PHP 5.0

Delay in seconds and nanoseconds

Parameters

Parameter Data type Default value Note
$seconds int not Must be a positive integer.
$nanoseconds int not Must be a positive integer less than 1 billion.

Return values

bool

Returns true on success, otherwise false on failure.

If the delay was interrupted by a signal, an associative array with components will be returned:

  • seconds - the number of seconds remaining in the delay.
  • nanoseconds - the number of nanoseconds remaining in the delay

Other resources

Official documentation of the time-nanosleep function

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.