Parametrizing the time an element stays in an open subset Let $X$ be a topological space (If it helps anything, we can assume $X\subseteq\mathbb{R}^n$ or $X$ being a smooth manifold.) and $U\subseteq [0,1]\times X$ an open subset.
Does there exist a continuous map $\mu\colon X\rightarrow (0,\infty)$, such that if $(0,x)\in U$ holds, then $(t,x)\in U$ holds for all $0\le t\le \mu(x)$?
 A: As already noted in a comment by "1999", this is not generally true as
written, even for Euclidean spaces.
For example take $X = \mathbb{R}$ and
$U = \{ (t, x) \in [0,1] \times X \mid t < |x| \}$.
However, with some minor modifications we get a true statement.

Let $X$ be a perfectly normal space and $U$ an open subset of
  $[0, 1] \times X$.
  Then there is a continuous $\mu: X \to [0, 1]$ such that
  for all $x$ for which $(0, x) \in U$ 
  
  
*
  
*$\mu(x) > 0$ and
  
*$(t, x) \in U$ for all $0 \le t \le \mu(x)$.

This follows almost immediately from the following lemma's.

Lemma 1: Let $X$ be a topological space and $U$ an open subset of
  $[0, \infty) \times X$.
  Then $f(x) = \min \{ t \in [0, \infty] \mid (t, x) \notin U \}$ defines
  a lower semicontinuous $f: X \to [0, \infty]$.

Sketch of proof:
$f$ is well-defined because $[0, \infty]$ is compact.
For lower semicontinuity, it suffices to prove that if $f(x) > M$, then
there is a neighbourhood $V$ of $x$ such that $f(y) > M$ for all $y \in V$.
Note that $f(x) > M$ iff $[0, M] \times \{x\} \subset U$.
Since $[0, M] \times \{x\}$ is compact, there are open sets $V \subset X$
and $W \subset [0, \infty)$ such that
$[0, M] \times \{x\} \subset W \times V \subset U$.
Then for each $y \in V$ we have $[0,M] \times \{y\} \subset U$, hence
$f(y) > M$.

Lemma 2: Let $X$ be a perfectly normal topological space and
  $f: X \to [0, \infty]$ lower semicontinuous.
  Then there is a continuous $g: X \to [0, 1]$ such that 
  $g(x) = 0$ when $f(x) = 0$ and $0 < g(x) < f(x)$ when $f(x) > 0$.

Sketch of proof:
For $n \in \mathbb{N}$ put $F_n = \{ x \in X \mid f(x) \le 2^{-n} \}$.
Since $F_n$ is closed there is a continuous $g_n: X \to [0, 2^{-n-1}]$
such that $g_n^{-1}[\{0\}] = F_n$.
Put $g = \sum_{n=1}^\infty g_n$. By uniform convergence, $g$ is continuous, and we have $g^{-1}[\{0\}] = \bigcap_{n=1}^\infty F_n = f^{-1}[\{0\}]$.
If $f(x) > 0$ there is a largest integer $n$ such that $f(x) \le 2^{-n}$.
Then $x \in F_m$ for all $m \le n$, therefore
$$g(x) = \sum_{m=n+1}^\infty g_n(x) \le
   \sum_{m=n+1}^\infty 2^{-m-1} = 2^{-n-1} < f(x)$$.
