title: C++ Linux: Get the refresh rate of a monitor
body: <p>In Windows, winapi provides a function that reports information about a monitor:</p>
  
  <pre><code>DEVMODE dm;
  dm.dmSize = sizeof(DEVMODE);
  
  EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &amp;dm);
  
  int FPS = dm.dmDisplayFrequency;
  </code></pre>
  
  <p>What is the equivalent of this on Linux?  The Linux man pages direct me to an allegro library function, but not only am I not using allegro, that function is from a very outdated version of said library and reportedly only works on Windows.</p>