Interstitial Ads Timer

I have practice integrating interstitial ads on android app

Everything works fine, the question is how to add timer to show interstitial ads every x minute ?

Depends on your app, but you should not show an interstitial every X minutes.
You should show an interstitial ad at a “pause” moment in your app (end of a round, end of a race, …)

Save the time you show the ad in a preference and, next time you want to show a new one, check if time since last one was not too short.

not all code have long level … sometimes 1 - 3 minute each level, its risky if show interstitial under 3 minute. If we can setup between 5 - 10 minute. I think its better. But i have no idea about java programming. Do you have example to integrate this timer ?