Session timeout warning

We’re interested in notifying the user
before
their session times out, so that they can prevent an expiration if they want to.

How easy would this be? What is the suggested approach?

Thanks,