Sometimes in cricket a fielder immediately tosses the ball after legitimately catching it. Batsmen generally are out in such cases and I haven't yet seen anyone objecting to it. Is there a min requirement of time for the fielder to keep it in his/her hands? Also, What happens if the ball reaches/crosses boundary on such random throw ups in the air?
Quoting relevant clause from the official discussion of Law 32 (Caught), Law 32 in Action:
- A Fair Catch A catch shall be considered to have been fairly made if:-
(a) The Fieldsman is within the field of play throughout the act of making the catch.
(i) The act of making the catch shall start from the time when the Fieldsman first handles the ball and shall end when he both retains complete control over the further disposal of the ball and remains within the field of play.
There is no time limit for how long the fielder should hold on to the ball, but the umpire should be convinced that he was in complete control of the disposal of the ball after completing the catch.
For the add-on question of what happens if the random toss up lands the ball beyond the boundary, as Spinner pointed out in the comments, once dismissal is complete, the ball becomes dead, and where it goes after that is irrelevant.
Trivia: Perhaps the most famous instance when this came into prominence was when Herschelle Gibbs caught Steve Waugh during a Super Six match of the 1999 ODI World Cup. In his haste to celebrate, he threw the ball away without being in complete control of it. Steve Waugh was declared not out, and went on to win the game for Australia. The result of this match came back to haunt South Africa later as their semi-final game ended in a tie, and Australia qualified for final having beaten South Africa in the Super Six game.
There's no minimum number of seconds in law - the general rule of thumb is that the fielder needs to be in control of the ball and control of his own movements. There have been occasions when a fielder tries to celebrate too early and drops the ball (Hershelle Gibbs in the World Cup a few years back, for instance).
The boundary only comes into play if the ball touches the ground, so a clean catch is not possible then.