On the BBQ grill
It depends on the size of the tenderloin and the heat of your grill. On mine, a whole pork tenderloin from Trader Joe's takes about 20 minutes. The best way to know when it is done is to use a meat thermometer. Remove it when the middle of the tenderloin reaches 140-145 and let it rest for 5 minutes. The inside should be just slightly tinged with pink but not red.
I agree with Ilooreen's answer and would also suggest that you use real wood and bank up the coals to one side. But if you are using gas, then it's just done when it's done. And don't be a meat flipper. Turn it once, and once only.