I think timestamp queries are supposed to return GPU-side timestamps.
Otherwise I don't see the point in adding a complex d3d query around
QueryPerformanceFrequency.
There's GL_ARB_timer_query which looks like it does what you need.
Show replies by date