It stops when the shot goes up and starts over on an offensive rebound. The three second count only applies when the players team is in control of the ball and control stops when the shot goes up.
Here's the NCAA rule book on the 3 second rule. Unless they have a special 3-second rule (which some leagues do modify the rules sometimes in crazy ways) I would suggest this is the rule they should follow.
http://www.ncaapublications.co...1.pdf
page 120
Section 9. Three-Second Rule
Art. 1. A player shall not be permitted to have any part of his or her body
remain in the three-second lane for more than three consecutive seconds
while the ball is in control of that playerÂs team in his or her front court.
a. A team in control of the ball for a throw-in adjacent to a front-court
boundary line may not be called for a three-second violation.
Art. 2. Allowance shall be made for a player who, having been in the threesecond
lane for less than three seconds, dribbles or moves in immediately
to try for field goal.
a. The player shall not pass the ball instead of trying for goal.