You are here

protected function AmazonSesHandler::getSleepTime in Amazon SES 2.0.x

Get the number of microseconds to pause for throttling.

Return value

int The time to sleep in microseconds.

1 call to AmazonSesHandler::getSleepTime()
AmazonSesHandler::send in src/AmazonSesHandler.php
Send an email using the AWS SDK.

File

src/AmazonSesHandler.php, line 211

Class

AmazonSesHandler
Amazon SES service.

Namespace

Drupal\amazon_ses

Code

protected function getSleepTime() {
  $per_second = $this->client
    ->getSendQuota();
  $rate = ceil(1000000 / $per_second);
  return intval($rate);
}