当前位置: 首页>>代码示例>>PHP>>正文


PHP Scheduler::debug方法代码示例

本文整理汇总了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>
开发者ID:iceeyhot,项目名称:sc2calc.org,代码行数:31,代码来源:update.php


注:本文中的Scheduler::debug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。