Adding timeout API for busy waiting with timeout implemented in user