Time field that can be used as both a Duration Field and a Start Time Field

I'm making a recipe app.

When adding an ingredient, I need a field that can be used to specify the time that the ingredient must be added, OR the duration it must cook.

For example, I can add onions after 10 minutes since the start of the cook, OR I can caramelize the onions FOR 10 minutes

Currently, I can only enter the time that the ingredient must be added: addition time field

I need to add some sort of toggle so that the user can chose if this time is a duration or an addition time

Edit:

An idea I've had is to display both the time field AND a duration field, separated with a toggle switch.When the toggle switch is pointed at the time field, the duration field is disabled, but it still dynamically displays the duration calculated from the addition time. What do you think?

Thank you.