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
This commit is contained in:
remicollet 2012-09-14 15:02:00 +00:00
parent 9ab634b313
commit abbbbf1cad

View File

@ -119,7 +119,9 @@ class PluginExampleExample extends CommonDBTM {
static function cronSample($task) { static function cronSample($task) {
$task->log("Example log message from class"); $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; return 1;
} }