Adding stoping condition after specific time