[fusion-commits] r2410 - trunk/layers/MapServer/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue Jul 5 15:09:52 EDT 2011


Author: pagameba
Date: 2011-07-05 12:09:52 -0700 (Tue, 05 Jul 2011)
New Revision: 2410

Modified:
   trunk/layers/MapServer/php/Session.php
Log:
add implementation of time_sleep_until for those missing it (like me)

Modified: trunk/layers/MapServer/php/Session.php
===================================================================
--- trunk/layers/MapServer/php/Session.php	2011-07-05 14:04:51 UTC (rev 2409)
+++ trunk/layers/MapServer/php/Session.php	2011-07-05 19:09:52 UTC (rev 2410)
@@ -60,6 +60,19 @@
 $gSzSessionDebug = FALSE;
 $bLockSession = FALSE;
 
+if (!function_exists('time_sleep_until')) {
+   function time_sleep_until($future) {
+       if ($future < time()) {
+           trigger_error("Time in past", E_USER_WARNING);
+           return false;
+       }
+
+       usleep(($future - microtime(1))*1000000);
+       return true;
+   }
+}
+
+
 if (!function_exists("_open")) {
   /**
    * _open Called by PHP session manager when a session is opened.



More information about the fusion-commits mailing list