本文整理汇总了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>