Well, if there's a PHP function for it it will be listed with the other [man]mysql[/man] functions in the manual.
If there's a MySQL function for it, it will be listed in MySQL's documentation.
If they don't have anything you could record the time before you start the query, and record the time again when you've finished. The difference would include the time it took to send the query to MySQL and get the result back, but the overhead shouldn't be that much.