PHP 클래스 Tolerance\Throttling\Rate\TimeRate

또한 보기: https://github.com/bandwidth-throttle/token-bucket/blob/master/classes/Rate.php
상속: implements Tolerance\Throttling\Rate\Rate
파일 보기 프로젝트 열기: sroze/tolerance

공개 메소드들

메소드 설명
__construct ( integer $ticks, string $unit ) Sets the amount of ticks which will be produced per unit.
getTicks ( ) : float It returns the number of ticks per second basically.

메소드 상세

__construct() 공개 메소드

E.g. new TimeRate(100, TimeRate::PER_SECOND) will produce 100 ticks per second.
public __construct ( integer $ticks, string $unit )
$ticks integer The amount of ticks per unit
$unit string The unit as one of Rate's constants

getTicks() 공개 메소드

It returns the number of ticks per second basically.
public getTicks ( ) : float
리턴 float