I think it can be done in different ways. If you use a clock block as an input to if and if action subsystems you can change switching time. Alternatively it is also possible to change switching duration time dynamically by creating a code for Matlab Function block to manage switching.
You can use a constant block. Use a variable name in the constant value. Then run the simulation. Change the variable value from workspace when needed. Then go to simulink and update diagram(ctl+D) .