HOUSTON — Just like clockwork, DJ T. Gray knows when Houston Rockets guard James Harden typically runs on to the Toyota Center floor before tipoff to get his shots up. And even if the Rockets’ house deejay is in the middle of playing a song, within about 10 seconds he will mix in a hip-hop banger definitely beloved by the NBA All-Star to help get him ready.

“I know the clock,” said Teryl Gray, 41, who goes by DJ T. Gray. “About 10 minutes before the doors open, he will come out to shoot around and warm up. There are different tempos for him. Sometimes I keep it around 90 bpm [beats per minute]. We’ll go trap music to 70 bpm and lower than that. You kind of have to feel him out. And I’ve been doing it for so long, you get a good vibe for people and who they are every day of the week.

“I switch songs as soon as he comes out. It might be within 10 seconds. Sometimes I get lucky and it’s around the time of the chorus. I say, ‘Right on time.’ I can blend in some party jams.”

The sixth-year Rockets guard is a hip-hop head who enjoys hearing his favorite songs when he does his pregame shooting routine. Gray said some of Harden’s friends regularly give him the Rockets star’s current playlist and text him when a new song comes out that he loves. Gray says Harden adores his native Los Angeles’ hip-hop and loves Southern rap too.

While there are challenges in finding some of the underground rap songs Harden likes and bleeping out the curse words, Gray can usually find it and clean it up. For example, one of Harden’s favorite old songs played pregame during the playoffs last year was “I Don’t Stress,” a 2005 song by Los Angeles rapper Nipsey Hussle that is laced with bleeps for curse words. But it’s hard to stump a deejay who has been spinning since age 10 and first spun at a Houston club at age 15. Gray is also a member of numerous record pools and often hears songs three months before they come out.

“I know his boys. And his boys will come by or they will text message, ‘You got this?’ ” Gray said. “Or, ‘Can you clean this [expletive-laced rap] song up?’ He is from L.A., so it’s a lot of hip-hop stuff. A lot of Nipsey Hussle. Some mixtape dudes that most mainstream dudes have not heard of, Bino Rideaux, 03 Greedo. All these other people out there. YG. And even here locally with Travis Scott as well as Huncho Jack, also known as Quavo.”

Harden and the Rockets host the Warriors in Game 5 of the tied best-of-seven Western Conference finals on Thursday night. The leading candidate for the 2018 NBA MVP award is averaging 29.5 points per game in these West finals. The winner in this key contest will be one victory away from the 2018 NBA Finals.

So what hip-hop songs will Gray spin Thursday night to get Harden’s juices flowing as he gets his pregame shooting routine in?

“ ’Grindin All My Life,’ by Nipsey Hussle. ‘Shoot’ by BlocBoy JB. The new Drake record and the new Travis Scott song with Kanye West and Lil Uzi Vert. It’s called ‘Watch,’ ” Gray said.

So does Harden like anything other than hip-hop playing when he shoots pregame?

“Never. Never. I did see him rocking out to an old record I played with Field Mob featuring Ciara. He heard me playing that and looked up and said, ‘Yeah.’ You must’ve been in middle school when it played,” Gray said.

Gray has been working with the Rockets’ game-night crew since the Toyota Center opened in 2001. Initially, the Houston native was the public-address announcer yelling out names such as Yao Ming, Stevie Francis and Tracy McGrady before moving over to his familiar DJ role. Gray is also a DJ for Major League Soccer‘s Houston Dynamo and Houston KRIV-Fox 26.

Gray said he plays music to please all fans at Rockets games.

“My job is to make sure that everyone here is happy, from the players to the people in the top to the oldest fan in here. I try to find that happy balance of playing Nipsey Hussle and KC and The Sunshine Band,” Gray said.

But there is an exception to the music rule for DJ TGray, and that is when Harden arrives on the floor for pregame shots. Gray said he has talked to Harden several times, and the subject is always hip-hop music.

“He’s on it. James is a very keen dude,” Gray said. “It’s very welcomed in music. He’s younger than me, a lot younger than me, and there is some older stuff that he is very knowledgeable of. I’m very appreciative of that. …

“He asks, ‘You got the new … ?’ It’s all strictly music. No hoops. None of that stuff, which I appreciate.”