huxihx created KAFKA-8881:
-----------------------------
Summary: Measure thread running time precisely
Key: KAFKA-8881
URL: https://issues.apache.org/jira/browse/KAFKA-8881
Project: Kafka
Issue Type: Improvement
Affects Versions: 2.4.0
Reporter: huxihx
Currently, the code uses `System.currentTimeMillis()` to measure timeout.
However, many situations trigger the thread suspend such as gc and context
switch. In such cases, the timeout value we specify is not strictly honored.
Maybe we could use ThreadMXBean#getCurrentThreadUserTime to precisely measure
the thread running time.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)