Changed timeout type to time_t
Fixed the correct usage of the timer
Revert "Changed timeout type to time_t Fixed the correct usage of the timer"

This reverts commit af776162f6d37b19db28edbbd6e4c1da30d6dab0.