diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-09-05 14:44:03 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-09-05 14:44:03 -0230 |
commit | bdcf4f222f50b915d2dfc0ea3960758adf6937db (patch) | |
tree | e263a048b6297395c97e860c87a0ca27b569cb08 /java/src/IceInternal/TcpTransceiver.java | |
parent | Added missing file (diff) | |
download | ice-bdcf4f222f50b915d2dfc0ea3960758adf6937db.tar.bz2 ice-bdcf4f222f50b915d2dfc0ea3960758adf6937db.tar.xz ice-bdcf4f222f50b915d2dfc0ea3960758adf6937db.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1351 - use monotonic timers where possible
Diffstat (limited to 'java/src/IceInternal/TcpTransceiver.java')
-rw-r--r-- | java/src/IceInternal/TcpTransceiver.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/IceInternal/TcpTransceiver.java b/java/src/IceInternal/TcpTransceiver.java index 8b5693fdb3f..f07bff3a62c 100644 --- a/java/src/IceInternal/TcpTransceiver.java +++ b/java/src/IceInternal/TcpTransceiver.java @@ -186,9 +186,9 @@ final class TcpTransceiver implements Transceiver { if(timeout > 0) { - long start = System.currentTimeMillis(); + long start = IceInternal.Time.currentMonotonicTimeMillis(); int n = _writeSelector.select(timeout); - if(n == 0 && System.currentTimeMillis() >= start + timeout) + if(n == 0 && IceInternal.Time.currentMonotonicTimeMillis() >= start + timeout) { throw new Ice.TimeoutException(); } @@ -286,9 +286,9 @@ final class TcpTransceiver implements Transceiver { if(timeout > 0) { - long start = System.currentTimeMillis(); + long start = IceInternal.Time.currentMonotonicTimeMillis(); int n = _readSelector.select(timeout); - if(n == 0 && System.currentTimeMillis() >= start + timeout) + if(n == 0 && IceInternal.Time.currentMonotonicTimeMillis() >= start + timeout) { throw new Ice.TimeoutException(); } |