Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -30,6 +30,9 @@ abstract class Notify {
protected $_message;
protected $_start;
protected $_timer;
protected $_tick;
protected $_iteration = 0;
protected $_speed = 0;
/**
* Instatiates a Notification object.
@ -92,23 +95,21 @@ abstract class Notify {
* @return int The number of ticks performed in 1 second.
*/
public function speed() {
static $tick, $iteration = 0, $speed = 0;
if (!$this->_start) {
return 0;
} else if (!$tick) {
$tick = $this->_start;
} else if (!$this->_tick) {
$this->_tick = $this->_start;
}
$now = microtime(true);
$span = $now - $tick;
$span = $now - $this->_tick;
if ($span > 1) {
$iteration++;
$tick = $now;
$speed = ($this->_current / $iteration) / $span;
$this->_iteration++;
$this->_tick = $now;
$this->_speed = ($this->_current / $this->_iteration) / $span;
}
return $speed;
return $this->_speed;
}
/**