Attribute listInstance is now cored
[core.git] / inc / classes / main / class_BaseFrameworkSystem.php
index cb52a1c391570406fcf06a3b9fedaf0b7ced8b75..5237b802b1faedba51b31d9a45f985d39f5aead9 100644 (file)
@@ -83,6 +83,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        private $iteratorInstance = null;
 
+       /**
+        * Instance of the list
+        */
+       private $listInstance = null;
+
        /**
         * The real class name
         */
@@ -1145,7 +1150,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                // Idle so long with found function
                if (function_exists('time_sleep_until')) {
                        // Get current time and add idle time
-                       $sleepUntil = $this->getMilliTime() + $milliSeconds;
+                       $sleepUntil = $this->getMilliTime() + abs($milliSeconds) / 1000;
 
                        // New PHP 5.1.0 function found
                        $hasSlept = time_sleep_until($sleepUntil);
@@ -1158,6 +1163,25 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                // Return result
                return $hasSlept;
        }
+
+       /**
+        * Setter for the list instance
+        *
+        * @param       $listInstance   A list of Listable
+        * @return      void
+        */
+       protected final function setListInstance (Listable $listInstance) {
+               $this->listInstance = $listInstance;
+       }
+
+       /**
+        * Getter for the list instance
+        *
+        * @return      $listInstance   A list of Listable
+        */
+       protected final function getListInstance () {
+               return $this->listInstance;
+       }
 }
 
 // [EOF]