The book gives a more complicated proof than I wrote, I was wondering if mine was incorrect:
Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be nonconstant and assume $x \leq y$ implies $f(x) \leq f(y)$. Prove that there exist $a \in \mathbb{R}$ and $c > 0$ such that for all $x \in [0,1]$, $f(a+x)-f(a-x) \geq cx$.
Solution: Suppose that for all $a \in \mathbb{R}$ and $c > 0$ there exists $x \in [0,1]$ such that $f(a+x)-f(a-x) < cx$. Since $c$ was arbitrary, $f(a+x)-f(a-x) \leq 0$. But $f$ is weakly increasing so $f(a+x)-f(a-x) \geq 0$, so $f(a+x)=f(a-x)=d$ for some $d$ and $f(y)=d$ for all $y \in [a-x,a+x] $.
Set $f_{\leq d}=\{y|f(y) \leq d\}$ and similarly for $f_{\geq d}$. Since $f$ is weakly increasing $f_{\leq d}$ is $\mathbb{R}$, $(-\infty,e)$ or $(-\infty,e]$. But if $e=\sup f_{\leq d}$, there would be $x' \in [0,1]$ such that $f(e+x')=f(e-x') \leq d$. So $f_{\leq d}=\mathbb{R}$ and similarly $f_{\geq d}=\mathbb{R}$, so $f$ is constant which is contrary to our assumption.