...
The logic in the Timer
class does not in itself magically enforce any timeouts. The code that uses the Timer
object must interact with it explicitly to update it (update()
) and query it (remainingMs()
, isExpired()
, and notExpired()
) to determine the remaining value of the timeout.
The Timer
class is not designed to be thread-safe. Although it might be useful to reuse the same Timer
object in both the application and network I/O threads, this is currently ill-advised due to the lack of thread safety. This will likely force us to have two separate Timer
instances (one for each thread), which is less than ideal
Compatibility
The new consumer should be backward compatible.
...