/** * @param $string * @return mixed */ public function frame($string) { $time = microtime(true); if ($time - $this->lastFrameTime > $this->threshold) { $this->animation->frame($string); $this->lastFrameTime = $time; } }