Automatic Gain Control Mechanism

Explain in Detail How Automatic Gain Control Works in LimeSDR, For a project, I would want to know how much samples does the LimeSDR takes, in order to adjust gain?
For e.g. does it consider the previous (say 10 values) to manage the gain, or what?