The formula is:
fuel consumption = horsepower x specific fuel consumption x time
The only things you need to know are the horsepower being used and the specific fuel consumption of the engine, neither of which is readily available. You can make some estimates, though. Specific fuel consumption for diesels varies from a low of around .3 lb/hp-hr to around .4 lb/hp-hr.
Using both sfc figures, a 22 hp tractor running at 100% power would use:
lb/hr = 22 hp x .3 lb/hp-hr x 1 hour
= 6.6 lb/hr or roughly .9 gal/hr on the low side (#2=7.2lb/gal)
lb/hr = 22 x .4 x 1
= 8.8 lb/hr or roughly 1.2 gal/hr
The biggest unknown is how much power the engine is producing. Just because the engine is running its highest rpm doesn't mean it's producing full power. Still, it's useful to know these figures because they show max fuel consumption and if you're using a lot more than that, it lets you know something's wrong.