preethi Ayyappan wrote: . . . Is it possible to directly subtract these values . . . ?
You tell us. Write down on a sheet of paper how you would intend to subtract two times. Remember you can only subtract numbers; you cannot "subtract" strings.
Can you create a Time class and subtract hours minutes seconds, or can you only subtract seconds. When you work out how to do it on paper, you will see how to do it in code.
By the way: the names of your variables, h, h1 add temp are not at all informative. Imagine coming back to that code in 6 months are having to work out what "h" means.