Display.sync equivalent for LWJGL3

Since LWJGL3 came out a few years ago, I found, and have been using this for synchronizing my game thread hz:
https://pastebin.com/44bMVmWF

It’s slightly modified from a code-snippit posted on the LWJGL forums.

This code works fantastically, however it burns my laptop’s CPU. I was wondering if there was any good alternatives to achieve the same effect?