]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
slightly better int math
authorEvan Prodromou <evan@prodromou.name>
Sun, 31 Aug 2008 01:44:04 +0000 (21:44 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sun, 31 Aug 2008 01:44:04 +0000 (21:44 -0400)
darcs-hash:20080831014404-84dde-ef3f9aa997b6d0727958f56d68c9b6738e20225e.gz

extlib/XMPPHP/XMLStream.php

index 91d81df67e1b54ea1ada2b78b2e4e6a9f52010ca..5e1d34235891896ec9470510af160107bbc058e2 100644 (file)
@@ -336,7 +336,7 @@ class XMPPHP_XMLStream {
                                $usecs = 0;
                        } else {
                                $usecs = $remaining % 1000000;
-                               $secs = ($remaining - $usecs) / 1000000;
+                               $secs = floor(($remaining - $usecs) / 1000000);
                        }
                        $this->log->log("stream_select(read, write, except, $secs, $usecs)",  XMPPHP_Log::LEVEL_VERBOSE);
                        $updated = @stream_select($read, $write, $except, $secs, $usecs);