An apartment or landlord inspection should take no more than 30 minutes to an hour but most landlord or apartment inspections take less than 30 minutes.
When I used to live in apartments the landlord inspections only took at most 25 minutes and then the landlord was gone.
The landlord should give you 24 hours notice prior to the landlord or apartment inspection so you can be prepared for the inspection.
If the landlord doesn't give you 24 hours prior notice for the landlord or apartment inspection then you can refuse it and tell them to come back after they give you notice.
The landlord just wants to make sure the apartment is in good condition and that no damage has been done.