It was a fraction of a second that no driver really noticed. But the difference between a 2.9 second yellow light and a 3.0 second yellow light meant about 77,000 tickets for Chicago motorists, and a $7.7 million windfall for the city’s coffers, according to the Chicago Tribune.

It is the latest in the long and rancorous debate over whether automatic traffic violations are about safety or revenue for cash-strapped cities and municipalities.

The automated tickets, usually based on radar and photographic evidence of speeding or running a red light, are notoriously difficult, though not impossible, to dispute. And they bring in millions for cities.

Under Chicago Mayor Rahm Emanuel’s administration, it appears that unbeknownst to drivers, the rules of the game changed — ensnaring thousands more motorists with costly fines.

The Chicago Tribune, in a series of articles investigating a curious surge in red light traffic tickets this year, found that in many cases, judges were throwing out fines because the city’s cameras were catching motorists in 2.9-second yellow lights instead of the 3.0-second minimum that federal safety regulations mandate for traffic at slower speeds.

And upon closer inspection, the situation was even more stark. Among tickets issued since April that were challenged by drivers in court, the paper found that about 30 percent of tickets that had been thrown out violated the 3.0 second guideline. And of all tickets issued, in general, only a small fraction are ever contested.

According to the Tribune, the .10 of a second change was approved by the Emanuel administration when it shifted to a new vendor this year:

The Emanuel administration quietly issued a new, shorter yellow light standard when the city began the transition from red light camera vendor Redflex Traffic Systems to Xerox State & Local Solutions in February. Confronted by complaints from hearing officers and questions from the Tribune about the tickets issued at shorter yellow lights, the administration reversed course in September and told Xerox to re-establish the three-second standard.

So are all those drivers issued refunds? Emmanuel told the Tribune that he’s looking into it.

“I have to go talk to other people that operate this,” he said. “And also do we want to run a process where they get a chance to go back and look at it. I can’t make a decision on $7 million that hasn’t been reviewed. So I don’t know. That’s what it does. I don’t know, and I’ll go talk to people about it.”

For drivers it’s cold comfort, and more reason to distrust a system that seems stacked against them.

In Washington, D.C., an inspector general found that speeding ticket violations were “arbitrary” and inconsistent:

One reviewer told the inspector general that the speeding vehicle is “usually the closer one” to the speed camera. The report said there was “a lack of precision and certainty [as to] which vehicle was speeding.”

The stakes are high in the District as well. D.C. officials projected that automated traffic ticket revenue would bring in $93.7 million in fiscal 2014. That figure turned out to more than $70 million under projections, throwing a monkey wrench into budgeting for the following year.

And in New York, a single traffic camera in Brooklyn was responsible for more than $77,000 in tickets: One Brooklyn speed camera ticketed 1,551 times in a single day earlier this year, totaling $77,550 in revenue for New York City.

City officials in New York, Washington and elsewhere insist that the automated ticketing cameras are about safety, not revenue. But with a financial windfall so high, watchdogs are skeptical.

“Ticket writing in Washington, D.C., proper has become a capricious, arbitrary and draconian money-making undertaking,” John B. Townsend II of AAA Mid-Atlantic told The Post in September. “Unfortunately, it has also become a quarter-billion-dollar annual enterprise based upon 3 million tickets in the city that merely pays lip service to traffic safety.”