SAN FRANCISCO — Justices on California’s high court on Tuesday grappled with how the state’s worker-friendly wage-and-hour laws apply to employees required to do brief off-the-clock tasks before or after their work shifts.

The arguments in Troester v. Starbucks focused on whether employers can assert a common defense under the California Labor Code used to excuse not paying for tasks that take less than 10 minutes under the Fair Labor Standards Act.