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


PHP Timer::Push方法代码示例

本文整理汇总了PHP中Timer::Push方法的典型用法代码示例。如果您正苦于以下问题:PHP Timer::Push方法的具体用法?PHP Timer::Push怎么用?PHP Timer::Push使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Timer的用法示例。


在下文中一共展示了Timer::Push方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Graph

 function Graph($aWidth = 300, $aHeight = 200, $aCachedName = "", $a = 0)
 {
     if (BRAND_TIMING) {
         global $tim;
         $tim = new Timer();
         $tim->Push();
     }
     $this->img = new RotImage($aWidth, $aHeight, $a);
     $this->cache = new ImgStreamCache($this->img);
     $this->title = new Text("");
     $this->legend = new Legend();
     if ($aCachedName != "" && READ_CACHE) {
         if ($this->cache->GetAndStream($aCachedName)) {
             exit;
         }
     }
     $this->cache_name = $aCachedName;
     $this->SetTickDensity();
     // Normal density
 }
开发者ID:Ethennoob,项目名称:Web,代码行数:20,代码来源:jpgraph.php

示例2: foreach

    $i = 1;
    foreach ($allfiles as $f) {
        $buf .= "<h4>Theme {$i} (<i>" . $names[$i - 1] . ")</i></h4>\n";
        $buf .= sprintf($frm, basename($f));
        ++$i;
    }
    $fp = fopen(CACHE_DIR . "themes.html", "w");
    if (!$fp) {
        die("Can't create index file.");
    }
    fwrite($fp, $buf);
    fclose($fp);
    echo "<br>";
}
$th = array("earth" => array(22, 424, 10, 34, 40, 45, 49, 62, 63, 74, 77, 119, 120, 134, 136, 141, 168, 180, 209, 218, 346, 395, 89, 430), "pastel" => array(22, 424, 27, 38, 42, 58, 66, 79, 105, 110, 128, 147, 152, 230, 240, 331, 337, 405, 415), "water" => array(22, 424, 8, 10, 14, 24, 56, 213, 237, 268, 326, 335, 370, 387, 388), "sand" => array(22, 424, 19, 34, 50, 65, 72, 82, 131, 168, 209));
echo "<h2>JpGraph color chart</h2>";
echo "Generating color chart images ...<br>\n";
flush();
$timer = new Timer();
$timer->Push();
GenColIndex();
echo "<p>Generating themes...";
GenThemes($th);
$t = $timer->Pop() / 1000;
$t = sprintf("<p>Work done in: %0.2f seconds.", round($t, 2));
echo "{$t}<p>See <a href=\"" . CACHE_DIR . "colorchart.html\">Colorchart</a>\n";
echo "<br>See <a href=\"" . CACHE_DIR . "themes.html\">Index of themes</a>\n";
?>


开发者ID:eguicciardi,项目名称:ada,代码行数:28,代码来源:gencolorchart.php


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