18. The angle $x$ is measured in radians and is such that $0 \leq x \leq \pi$.
The total length of any intervals for which $- 1 \leq \tan x \leq 1$ and $\sin 2 x \geq 0.5$ is
A $\frac { \pi } { 12 }$\\
B $\frac { \pi } { 6 }$\\
C $\frac { \pi } { 4 }$\\
D $\frac { \pi } { 3 }$\\
E $\frac { 5 \pi } { 12 }$\\
F $\frac { \pi } { 2 }$\\
G $\quad \frac { 5 \pi } { 6 }$\\