See the variable nTargetSpacing
. The difficulty adjustments will try to steer the average block time towards this value (in seconds).
You can't change this at runtime. In fact, you can't easily change it at all once you've released your coin. All clients on the network need to agree on this number, since it is used to calculate the required difficulty. If you change it after release, then there will be a disagreement between old and new clients as to whether various blocks are valid, and your coin will have a hard fork.