anything over 5hrs is classed as a stopover that is why you are allowed to leave the airport as taxes and duty will be included on your ticket so you may do this if you wish. anything under 5rs is a layover and no tax or duty will be added to your ticket so you won't be able to leave the airport.