(Reuters) - California’s top state court said on Thursday that employers must pay their workers for small amounts of time they spend on work tasks after clocking out, in a ruling that will likely lead to the revival of a lawsuit against Starbucks Corp.

FILE PHOTO: A patron holds an iced beverage with a straw, at a Starbucks coffee store in Pasadena, California, U.S., July 25, 2013. REUTERS/Mario Anzuoni/File Photo

The California Supreme Court said a rule under federal wage law that excuses companies from paying workers for small amounts of time that are difficult to record did not apply under California law.

The decision could be costly for many companies, particularly restaurants and retailers that have many hourly workers, since California, America’s most populous state, is home to nearly 40 million people and about 10 percent of the U.S. workforce.

The U.S. Chamber of Commerce, the nation’s largest business group, warned the court in a brief backing Starbucks that such a ruling would encourage workers to file lawsuits seeking pay for “trifling absurdities.”

A Starbucks representative said the company was disappointed with the decision.

Shaun Setareh, who represents former Starbucks employee Douglas Troester in a 2012 lawsuit against the company, said the ruling would force many companies to change their employment practices.

Troester said that after Starbucks employees clock out of work, they are required to transmit sales data, set an alarm, and sometimes bring in patio furniture or walk coworkers to their cars.

Those tasks could take up to 10 minutes each day, Troester said, and workers should have been paid for that time. In the 17 months he worked at Starbucks, he said he performed about 13 hours of unpaid work and was owed about $100.

A federal judge in San Francisco in 2014 dismissed Troester’s case, saying it would be impractical to require Starbucks to record the brief amount of time employees spent doing work tasks before leaving a store.

Troester appealed, and the 9th U.S. Circuit Court of Appeals asked the California Supreme Court to decide whether the “de minimis rule” under federal law also applied under state law.

The court said on Thursday that under California law, workers must generally be paid for any time they are required to be on their employers’ premises.

But the court said there could be cases involving tasks “that are so irregular or brief in duration” that companies are not required to pay for them.

The 9th Circuit must now apply the court’s decision in Troester’s case, which will likely lead to the lawsuit against Starbucks being revived.

The case is Troester v. Starbucks, California Supreme Court, No. S234969.