Метод | Описание | |
---|---|---|
__construct ( |
Sets the token rate. | |
convertMicrotimeToTokens ( double $microtime ) : integer | Converts a timestamp into tokens. | |
convertSecondsToTokens ( double $seconds ) : integer | Converts a duration of seconds into an amount of tokens. | |
convertTokensToMicrotime ( integer $tokens ) : double | Converts an amount of tokens into a timestamp. | |
convertTokensToSeconds ( integer $tokens ) : double | Converts an amount of tokens into a duration of seconds. |
public __construct ( |
||
$rate | The rate. |
public convertMicrotimeToTokens ( double $microtime ) : integer | ||
$microtime | double | The timestamp. |
Результат | integer | The tokens. |
public convertSecondsToTokens ( double $seconds ) : integer | ||
$seconds | double | The duration in seconds. |
Результат | integer | The amount of tokens. |
public convertTokensToMicrotime ( integer $tokens ) : double | ||
$tokens | integer | The amount of tokens. |
Результат | double | The timestamp. |
public convertTokensToSeconds ( integer $tokens ) : double | ||
$tokens | integer | The amount of tokens. |
Результат | double | The seconds. |