Primary Maintenance = 8hrs. Out of which 6 hrs is for the Actual Maintenance and 2 hrs is for Shunting if im correct.
Secondary Maintenance = It is Done at the Destination usually after the train Travels a Certain KMs, i think its 2000kms for LHB and 4000 Kms for ICF Coaches, Beyond this Distance the train compulsorily Requires Secondary Maintenance.