Any time you want to merge with other traffic, you should:

Anytime you want to merge with other traffic, you need a gap of about four seconds. If you move into the middle of a four-second gap, both you and the vehicle behind you have a two-second following distance. You need a four-second gap whenever you change lanes, enter a roadway, or when your lane merges with another travel lane.
DMV Writen Test