本文整理匯總了PHP中Scheduler::debug方法的典型用法代碼示例。如果您正苦於以下問題:PHP Scheduler::debug方法的具體用法?PHP Scheduler::debug怎麽用?PHP Scheduler::debug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Scheduler
的用法示例。
在下文中一共展示了Scheduler::debug方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
} elseif ($race == Zerg) {
Hatcheries::$debug = (bool) ($debugFlags & Hatcheries::debugFlag);
$timeline->hatcheries->add(new Hatchery(0, 3));
$timeline->farms->add(new Farm(0, $Hatchery->supplyCapacity));
$timeline->farms->add(new Farm(0, $Overlord->supplyCapacity));
//$timeline->queues->add(new ProductionQueue($Hatchery));
}
$timeline->queues->add(new ProductionQueue(Product::designated($race | Base)));
$timeline->supplyCount = 6;
// create recurring worker job
$job = new BuildJob(Product::designated($race | Worker));
$job->recurring = true;
$unscheduledJobs[] = $job;
// schedule jobs
$scheduler = new Scheduler($timeline, $unscheduledJobs);
Scheduler::$debug = (bool) ($debugFlags & Scheduler::debugFlag);
$scheduledJobs = $scheduler->schedule();
// render timeline
echo (string) $timeline;
// render queues
$timeEnds = 0;
foreach ($scheduledJobs as $job) {
$timeEnds = max($timeEnds, $job->timeCompleted);
}
?>
<h3>Usage of production queues</h3>
<p>This table shows the busy time of your production queues. Production queues which remain completely unused are not shown. A production queue is considered <i>destroyed</i> when the structure is morphed into another structure, such as a Warpgate or Orbital Command.</p>
<p>The timeline ends at <?php
echo simple_time($timeEnds);
?>
.</p>