Frame time increases significantly after exactly 30 seconds

I'm developing a game using OpenGL and have run into a strange issue. Exactly 30 seconds after creating a context, the frame time increases by 2 - 3x depending on the scene, and then remains constant. I am using query objects with GL_TIME_ELAPSED to get the frame time. Below is a small demo that demonstrates the issue.

It may not equate to much in this example, but it can mean a significant FPS drop in a real world application.

Or... it may not. If it's only a few microseconds, real-world applications wouldn't notice. In short, your profiling is too artificial to be detecting anything that is worrisome.

The fact that disabling adaptive clocking turned it "fixed" it is evidence of that. You were detecting the fact that your graphics card looked at your workload and said, "Oh, nothing much here. No need to stress myself."

you have wrote no code here, but it may be because of writing rendering functions in main display function(they will be re-rendered every 30 secs).
Try having some void init(){//hardworking functions, or rendering functions}., and just attaching it to your display.
It may fix the problem you have.