Although typical flashguns, such as Nikon's Speedlights, do not have a control for the duration of the output flash, they do have a manual mode which allows the unit to be set to minimum output. Output level is controlled not by changing the intensity of the light output but by the duration of the flash. With the output set to its minimum setting, it is therefore also set to the minimum flash duration. The actual minimum duration of the flash is difficult to determine but is typically around 1/25,000 - 1/50,000 of a second. In a darkened room where the flash is the only source of light, this represents a shutter speed capable of freezing all but the vary fastest actions.
In the case of flashguns that do not have a manual mode, the shortest flash duration is obtained in automatic mode by setting the flash to work with the largest lens aperture available. The camera's through-the-lens light meter then decides when sufficient light has been received for a correctly exposed image before quenching the flash output.
Always bear in mind that the required output for a correctly exposed image reduces as the flashgun is moved closer to a subject. The inverse square law applies, so halving the flash to subject distance quadruples the effective output. The flashgun does not necessarily need to be mounted on the camera, and may be connected to the camera via a suitable wired or radio link.