changed timeout unit to uint32_t microseconds