This is something I thought about when considering gates on a crossing on my own layout.
Here in the Panhandle of Texas, BNSF's standard for gates being fully lowered is 20 seconds before the train occupies the crossing. Down in the Metroplex, the Denton (Texas) A-Train runs Swiss diesel multiple unit cars on a track that they purchased from Southern Pacific, and the DNGO occasionally uses the track at night to switch industries. The Denton Area transit authority has their gates set to be fully lowered for a long interval, over 30 seconds.
Since the Federal Regulation does not specify a specific time interval between gates lowered and crossing occupancy, there are probably a variety of state regulations. Some states probably do not have anything beyond the Federal regulation, while other states micro-manage the time interval.
But, getting back to the model railroad, I decided against gates, but had decided that about 5 seconds was adequate for lowered gates in the model railroad environment, as the distances of everything are compressed, compared to prototype railroading.