This sounds like an ideal application for a thermal mass flow meter (MFM). These devices measure the flow of a gas between their inlet and outlet using a thermal conductivity measurement. Typically the output is given as a volumetric flow rate (e.g. cm^3 per minute) at standard temperature and pressure, but what is actually being measured is the rate of mass flow (i.e. number of grams or moles of gas per unit time). If you integrate this with respect to time you will get the total volume at stp which corresponds to the amount or mass.
The meter will need to be calibrated for the gas in use, so you will need to be sure either that your gas is (almost) pure H2, and buy a MFM calibrated for H2, or that its composition is relatively constant so that you can generate an appropriate calibration, else you will get inaccurate results. MFM's and their close relatives, mass flow controllers (MFC's) are available from many manufacturers but I've had very good experiences with those from MKS. They are available with a serial interface and the command protocol is easy to implement in Labview. I think the digital version can even do the flow integration for you. They're not cheap (maybe $1000?) but it sounds like this would probably be a reliable and accurate solution to your problem. Hope this helps, please reply with any further questions...
