Compact in space of bounded function with limit at infinity I have to find a "necessary and sufficient condition" for compact subsets of the metric space $$A = \{f : \mathbb{R} \rightarrow \mathbb{R}| f \ \mbox{is continuous and} \ \lim_{x \rightarrow \infty} f(x), \lim_{x \rightarrow -\infty} f(x) \in \mathbb{R}\}$$ with supremum norm $||f|| = \sup_{x \in \mathbb{R}} |f(x)|$.
The space $A$ is roughly the space fo continuous functions with limit at $\infty$ and $-\infty$ exist. I can show that $A \subseteq B(\mathbb{R}) := \{f : \mathbb{R} \rightarrow \mathbb{R}| f \ \mbox{is continuous and bounded on} \ \mathbb{R}\}$. 
So my first step is that I try to find a result concerning compact sets in $B(R)$, since it might help me to find compact sets in $A$.
However, I cannot find such a result anywhere.
Help pleases ?
(I also guess one condition might be to restrcit the limit at $\infty$ and $-\infty$, may be let them equal ?)
$\textbf{update} ------------------------------------$
I find some documents online about compactness in similar space (limit at infinity is 0)
https://www2.math.ethz.ch/education/bachelor/lectures/hs2014/math/fa/serie3.pdf
I try to modify the proof found here
https://www2.math.ethz.ch/education/bachelor/lectures/hs2014/math/fa/solution3.pdf
I think the first condition regarding equicontinuity might be the same, I guess I have to find a similar argument about limit at infinity (in case it converges to zero, the condition is the family needs to uniformly converges to zero)
Any suggestion ?
 A: The space $A$ is isomorphic to $C[-\pi/2,\pi/2]$ endowed with the uniform norm. To write down an isomorphism, map an element $f$ of $C[-\pi/2,\pi/2]$ to an element $g$ of $A$ in the following way: $g(x)=f\left(\tan x\right)$ if $-\pi/2\lt x\lt \pi/2$, $\lim_{x\to -\infty }    g(x)=f\left(-\pi/2\right)$ and $\lim_{x\to +\infty }    g(x)=f\left(\pi/2\right)$.
A: I think $A$ is compact iff the following hold:
i) $A$ is uniformly bounded
ii) $A$ is pointwise equicontinuous on $\mathbb R .$
iii) $A$ is equicontinuous at both $\infty$ and $-\infty.$
In iii), equicontinuity at $\infty$ means that for all $\epsilon>0,$ there exists $R>0$ such that for all $f\in A,$ $|f(y)-f(x)|<\epsilon$ for all $x,y\ge R.$ Same for equicontinuity at $-\infty.$
This result is intuitively clear if we use the isomorphism $I:A \to C[-\pi/2,\pi/2]$ given by $I(f) = f(\tan x), x\in \mathbb R ,$ with $I(f)$ at the endpoints given by the limits of $f$ at $\pm \infty.$ This is what Davide Giraudo mentioned. We know the compact subsets of $C[-\pi/2,\pi/2]$ by Arzela Ascoli , and that result pulled back to $A$ gives us i)-iii) above.
