You might want to give him or her five minutes or so to finish up before doing the diaper change if he or she is too young to be able to tell you when he or she is finished.
Older toddlers (at least age three or so) may be able to say “all done” (or something similar) when they are finished peeing and/or pooping, or be able to tell you if you ask them.