usleepWindows

Sleeps some number of microseconds.

Description

usleepWindows( (string) $usec ); 

Parameters (1)

0. $usec (string)
The number of microseconds to sleep

Usage

  1. if ( !function_exists( 'usleepWindows' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-globalpay/lib/class.nusoap_base.php'; 
  3.  
  4. // the number of microseconds to sleep 
  5. $usec = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = usleepWindows($usec); 
  9.  

Defined (2)

The function is defined in the following location(s).

/lib/class.nusoap_base.php  
  1. function usleepWindows($usec) 
  2. $start = gettimeofday(); 
  3.  
  4. do 
  5. $stop = gettimeofday(); 
  6. $timePassed = 1000000 * ($stop['sec'] - $start['sec']) 
  7. + $stop['usec'] - $start['usec']; 
  8. while ($timePassed < $usec); 
/lib/nusoap.php  
  1. function usleepWindows($usec) 
  2. $start = gettimeofday(); 
  3.  
  4. do 
  5. $stop = gettimeofday(); 
  6. $timePassed = 1000000 * ($stop['sec'] - $start['sec']) 
  7. + $stop['usec'] - $start['usec']; 
  8. while ($timePassed < $usec);