Time difference between two logs

I want to know how much time did a user spent on an application by using these logs –

2024-09-28 00:34:04,876 [ajp-nio-127.0.0.1-8889-exec-10] INFO PolarionLicensing - User ‘admin’ logged in with named ALM
2024-09-28 00:35:12,767 [ajp-nio-127.0.0.1-8889-exec-9] INFO PolarionLicensing - User ‘admin’ logged out.

I don’t think there is an easy way to do this with logql. I’d suggest writing your own script for this.