Games counting or not counting due to DC, Resign, Etc

I have a question: How long do you have to stay in a match (ranked or not) for it to count as a “played” game, I don’t think game sunder 1 minute DC/Resign/Quit/ISP failure count but which is the actual number of minutes?

Thank you.