the short answer is:
the camera's dhutter speed controls the ambient light exposure and the aperture controls the flash exposure.The flash's burn time is the actual exposure time.Think of your camera shutter as having two curtains.The time between the first being fully open and the second starting to close is your synch time.That'd when the flash needs to fire or either curtain may partially 'protect' some image area from exposure.This all relates to focal plane shutters as in 35mm SLRs;MF and LF lenses use leaf shutters,which synch at any speed. Since you are unlikely having a choice in shutters after the camera and lens is chosen,I suggest just to keepambient lighting at a minimum or balance ambient and flash appropriately.Rule of thumb is:Control the ambient light with your shutter speed and the flash exposure with your aperture. Good luck.