Answer:
Direct object.
Step-by-step explanation:
Gerund is demonstrated as the words that consists of adding 'ing' to the basic form of verb and functions as the noun or subject in the sentence. A gerund phrase is exemplified as the phrase that is introduced by a gerund along with any/or other objects or modifiers. These phrases can play multiple functions in a sentence either as the subject or object or as a compliment.
In the given sentence, the gerund phrase 'diving for hours everyday' that begins with the gerund 'diving'('ing' form of verb 'dive' is acting as noun) and functions as the direct object in the sentence as it is the recipient of the action of the verb 'had practiced'.