Is there an official time frame for flying the flag at half mast? I noticed on the way home from work that 2 govt. agencies flew the flag in separate ways...one at half mast and the other at full mast.

Is this up to each individual entity or is there a uniform time frame?