In your code, a difference between the two variables is performed, and the result will be cast to a double. If that’s what you are after, that is the way to go.
The x axis of the TH1 histogram will always be double, so there’s no way to get the result as integer.
The y axis of the TH1 histogram will be int or double depending on if you choose TH1L or TH1D. But that is just for counting how many entries per bin, it has nothing to do with t1 and t2.