Does $\limsup_{x\to\infty}\int_x^{x+h}f'(y)dy = 0$, $\forall h>0$, imply $\lim_{x\to\infty}\int_x^{x+h}f'(y)dy = 0$, $\forall h>0$? I have an absolutely continuous function $f:[0,\infty)\to[0,\infty)$ that satisfies $\limsup_{x\to\infty}\int_x^{x+h}f'(y)dy = 0$ for all $h>0$. I need to check if it is true or false that $\lim_{x\to\infty}\int_x^{x+h}f'(y)dy = 0$ for all $h>0$. Any hint will be welcome.

Sketch: Choose $N\in \mathbb N$ such that $2^n +n^2+n < 2^{n+1}$ for $n\ge N.$ Define
$$g = \sum_{n=N}^{\infty}\left ( \frac{1}{n}\chi_{(2^n,2^n+n^2)} - \chi_{(2^n+n^2,2^n+n^2+n)}\right ).$$
Now define $f(x) = \int_0^x g.$ Then $f$ is a counterexample. I'll leave it here for now. Ask if you have questions.
