First you need to sample the signal at a known interval... so in your program you create a bit of logic that runs once each second (or faster). The faster it runs (but still on a known interval) the less source of error it'll be.
Then you can either make assumptions and multiply the reading by the time between samples, in your cause this is 1 second, so in hours it will be 1/3600 and add that to a totaliser variable.
Or to be more precise you'll need a bit more maths... nothing crazy though. Imagine you have a trend of that value in t/h over time. The value you are looking for is literally the area of the graph.
So, in this case you'll need to calculate the area between samples, this will be in the hardest case, the area of a square-ish figure and the area of a triangle. It is important to know which direction the signal is going though.