public function rescheduleWithNewOffset($id, $addToOffset)
 {
     ArgCheck::isInt($id);
     ArgCheck::isInt($addToOffset);
     $query = sprintf("UPDATE %s SET offset = offset + %u, next_round_gmt = '%s' WHERE id = %u", self::TABLE_NAME, $addToOffset, Time::now()->addSeconds(2)->asSqlTimestamp(), $id);
     return $this->database->executeQuery($query);
 }
 private function addPlain($email, $ip)
 {
     ArgCheck::isEmail($email);
     ArgCheck::isIp($ip);
     $data = ['email' => $email, 'ip' => $ip, 'created_gmt' => Time::now()->asSqlTimestamp()];
     if ($this->database->insert(self::TABLE_NAME, $data) === false) {
         throw new \RuntimeException('Unable to add subscriber to the database');
     }
 }