In the NBA, the game clock lasts 12 minutes. There are 4 quarters which are each 12 minutes long.
In NCAA basketball, the game clock lasts 20 minutes. There are 2 halves which are each 20 minutes.
There a limit to how long a team can hold the ball. The shot clock keeps track of each possession. The shot clock resets when a basket is made, or any time the ball touches the hoop. In the NBA, the shot clock lasts 24 seconds. In NCAA basketball, the shot clock lasts 30 seconds.
If a team doesn't hit the rim by the time the shot clock runs out, they commit a shot clock violation. As a result, the play will be stopped and the ball will be given to the opposing team to inbound. Similar to the game clock, a successful shot will count as long as the ball leaves the hands of the shooter before the clock reaches zero.
Is it possible to stop the game clock or shot clock? With a timeout, teams can stop the clock from ticking, but only temporarily. Players can only call a timeout when they have the ball, or there is a dead ball. If a player calls for a timeout when their team is out of timeouts, there will be a technical foul called.