To make it easy Id suggest using a specific method to tell which is which.
I think you should use colon for a specific time and a floating point integer for duration.
02:00 = 2m
2 = 2 hours
This will make it easy to differentiate. If you like you can still double check with the user.