Add timeToUsecs function
Add special timeout for threaded runtime