From abbbbf1cad6fdf675268249867aec7979e433ae5 Mon Sep 17 00:00:00 2001 From: remicollet Date: Fri, 14 Sep 2012 15:02:00 +0000 Subject: [PATCH] cron: sleep some time for stat and test cron frequency git-svn-id: https://forge.glpi-project.org/svn/example/trunk@201 349b9182-4a13-0410-896f-e5e9767dd1b3 --- inc/example.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/example.class.php b/inc/example.class.php index 882706d..9ba1f3c 100644 --- a/inc/example.class.php +++ b/inc/example.class.php @@ -119,7 +119,9 @@ class PluginExampleExample extends CommonDBTM { static function cronSample($task) { $task->log("Example log message from class"); - $task->setVolume(mt_rand(0,$task->fields['param'])); + $r = mt_rand(0,$task->fields['param']); + usleep(1000000+$r*1000); + $task->setVolume($r); return 1; }