Best way(s) to time ad hoc queries and stored procedures
Profiler is easier to understand (all in one line) and will capture hidden IO, CPU etc in UDFs (scalar and multi-statement TVFs)

SET STATISTICS TIME ON and SET STATISTICS IO ON will not show you IO and CPU from scalar UDFs and multi-statement TVFs: only the "outer" query statistics

From SO:


SQL Server Profiler discrepancy
Table Valued Function where did my query plan go?
Does query plan optimizer works well with joined/filtered table-valued functions?


And no doubt some folk will disagree with me, so here is Adam Machanic on the subject too


Scalar functions, inlining, and performance