When adding or editing your events and tasks you can choose to show the end point as a date and time or a duration. If you choose to use the duration option then the duration you enter is simply used to automatically calculate the end date and time for you (unless auto resize is enabled)
If you select the option to show the End as a Duration you can manually type the duration amount. You can also select the period of the duration value. As many resources could be tagged in the event, the default value is the exact distance you want between the start date and the end date and is not just the working hours or the available hours, but actual difference between the start and the end date assuming all hours are available.
You can choose to enable auto resizing
based on a resources working hours to maintain an events duration.