[base] TimeSpan: code cleanup
[http] fixes infinite loop on write-EAGAIN