Revert "Revert "improve user timeout calculation""
Revert "Revert "improve user timeout calculation""

This reverts commit 06e8f18c43ae014a5a97d12bff57937e0c3c201e.

Xuefeng-Zhu/cSpeed,Xuefeng-Zhu/cSpeed,Xuefeng-Zhu/cSpeed