Automatically close interstitial ads after few seconds?

Hello, I have the following code which works fine and when I set it up on AdMob I set it to delay 7 seconds. Not sure if that applies to timeout or for a video bypass timer.

I would like to know how I can set it to automatically close the ad after 5 seconds? I have tried ads.hide(“interstitial”) but that only closes whats on the next screen, not this ad itself.

Any ideas?

local ads = require( “ads” )

local interstitial = “ca-app-pub-xxxxxxxxxxxxxxxxxx”
 
function adListener( event )
    if event.isError then
        – Failed to receive an ad
    else
        – loaded ad sucess
    end
end
ads.init( “admob”, interstitial, adListener )
 
–fullscreen:
ads.show( “interstitial”, { x=display.screenOriginX, y=display.screenOriginY, appId=interstitial} )