New York CNN Business  — 

ExxonMobil and Chevron both reported record massive profits thanks to record gasoline prices during the quarter.

Exxon’s profit, excluding special items, came to $17.6 billion in the second quarter, nearly double what it made in its very profitable first quarter as oil and gas prices started to soar in the wake of Russia’s invasion of Ukraine. Second-quarter profit was up 273% from the same period a year ago.

Chevron earned $11.4 billion excluding special items, up 74% from the first quarter and 247% from a year ago.

Including one-time items, both earned hundreds of millions more: ExxonMobil’s net income reached $17.9 billion, while Chevron brought in $11.6 billion.

ExxonMobil’s net income came to $2,245.62 every second of every day of the 92-day long quarter. On that basis, Chevron earned $1,462.11 per second.

Since it takes about two minutes to pump 20 gallons of gas, that means between them the two oil giants earned more than $400,000 between them in the time it took you to fill your tank.

Reuters reported that this was a record profit for both companies — though neither mentioned that in their statement, as companies typically do when their earnings reach all-time highs.

Oil prices have started to fall recently, and gas prices are falling along with them. AAA puts the average gas price Friday at $4.26 a gallon. That’s down 76 cents a gallon, or 15%, from the record of $5.02 a gallon reached on June 14.

But one of the major reasons for that decline is growing fears among investors trading in oil and gasoline futures that the nation is hurdling toward recession. And if it is, a major reason is that the Federal Reserve is hiking interest rates at a historically fast pace in an effort to bring inflation under control. And high gas prices is a major driver of those price increases.

The US economy has shrunk in size each of the last two quarters, which is a popular shorthand for a recession. Although economists are debating whether or not the economy is already in a recession, or if one lies ahead, many consumers feel like we’re already in an economic downturn. High gas prices are one of the reasons they feel that way.

Shares of ExxonMobil rose 4% and Chevron (CVX) rose 8% in midday trading on the better-than-expected earnings. ExxonMobil shares are up more than 50% this year through Thursday’s close, while Chevron (CVX) shares have gained more than 30%, making them among the best performers in the Dow Jones industrial average.