It is known that the average number of divisors, calculated over all positive integers between $1$ and $N$, can be expressed using the classical Dirichlet formula as
$$\frac{1}{N} \sum_{n=1}^N d(n)= \log(N)+2 \gamma -1+O(N^{-\frac{1}{2}})$$
where $\gamma$ is the Euler's constant and $d(n)$ is the divisor function. I would like to know whether there is a similar asymptotic formula if we restrict the calculation, for any $n$, to a narrower range for the divisors. In particular, given $n$, we can consider only the divisors $<c \sqrt{n}\,$, where $c$ is a positive real number.
Let us call this restricted divisor function $d(n,c)\,$. For $c=1\,\,$, the resulting summatory function trivially becomes
$$\frac{1}{N} \sum_{n=1}^{N} d(n,1)= \frac{1}{2} \log(N)+ \gamma -\frac{1}{2}+O(N^{-\frac{1}{2}})$$
However, for $c \neq 1 \,$ I was not able to prove a general asymptotic formula. After some calculations, I guess that the constant term varies by $\log(c)$, but I would be happy to have a formal proof.