<?php
include_once 'class.0.3.php';
$buff = new ScriptProgress(10, 10000);
$buff->addStylesheet();
$buff->addScript();
$data = array("initialize", "configure", "prepare process", "process", "post process", "send", "log", "render", "deliver", "done", "");
$c = count($data);
foreach($data as $index => $message) {
$rt = rand(100000, 999999);
if($index==0) {
$buff->set("<ul>");
} else {
$buff->set("<li></li>");
}
$buff->next();
if($index < $c - 1){
usleep($rt); // simulate real runtime 0.1 upt to 1 sec
$buff->notify($message, number_format($rt / 1000000, 3, '.', ''));
}
}
# end operation
$buff->set("</ul>");
$buff->next();
$buff->end();
|