Fix: avoid warn when cast float to int in PHP7.1.

I got some error.

```
 Implicit conversion from float 992216.1102294922 to int loses precision

---

```
This commit is contained in:
uzulla 2022-01-18 12:46:16 +09:00 committed by terrafrost
parent b2708aa783
commit ba4414c2f3

View File

@ -1331,8 +1331,8 @@ class Net_SSH2
$read = array($this->fsock);
$write = $except = null;
$start = strtok(microtime(), ' ') + strtok('');
$sec = floor($this->curTimeout);
$usec = 1000000 * ($this->curTimeout - $sec);
$sec = (int) floor($this->curTimeout);
$usec = (int) (1000000 * ($this->curTimeout - $sec));
// on windows this returns a "Warning: Invalid CRT parameters detected" error
// the !count() is done as a workaround for <https://bugs.php.net/42682>
if (!@stream_select($read, $write, $except, $sec, $usec) && !count($read)) {
@ -3518,8 +3518,8 @@ class Net_SSH2
$this->curTimeout-= $elapsed;
}
$sec = floor($this->curTimeout);
$usec = 1000000 * ($this->curTimeout - $sec);
$sec = (int)floor($this->curTimeout);
$usec = (int)(1000000 * ($this->curTimeout - $sec));
// on windows this returns a "Warning: Invalid CRT parameters detected" error
if (!@stream_select($read, $write, $except, $sec, $usec) && !count($read)) {