By allowing the user to type in whatever they want, you are setting yourself up for having to write tons of code for differentiation and error checking. Instead, I suggest using dialog elements to choose their time of day or duration.

Example:
- A radio button to switch between time of day and duration.

- Several drop-down boxes to choose hours/minutes/seconds (time of day and duration).

- A real-time text representation of when their selection will occur. ie "Time remaining: 3h 9m 43s"


Basically, don't give the users the chance to give you invalid or ambiguous data. Let them choose from pre-defined sets of data instead.

-genius_at_work