Changed thread sleep unit to microseconds.