/** * @return Service_Yandex_Direct_APIMapper */ private function delay() { $t = microtime(); if ($this->last_call_ts > 0 && ($d = $t - $this->last_call_ts) < Service_Yandex_Direct::option('delay')) { sleep(Service_Yandex_Direct::option('delay') - $d); } $this->last_call_ts = microtime(); return $this; }