Given a vector field all of whose integral curves are closed, is the period a smooth function? 
Disclaimer: The original question consisted of two parts. The first one
  has been answered negatively (see
  below the answers of Sam Lisi and
  Alejandro). It remains the second one.

Background
I am reading about the energy-period relation for Hamiltonian Systems.
In Weinstein's formulation (cf. Abraham, Marsden, Foundations of Mechanics 2nd Ed, page 198) this relation amounts to:

$(\ast)$ Given an Hamiltonian system $(M,\omega, X_H)$, let be $\Phi$ the flow of $X_H$ and $\text{per}:=\{(t,x)\in\mathbb R\times M\mid\Phi(t,x)=x\}.$
  If $N$ is a smooth submanifold contained in $\text{per},$ then $\left.dt\wedge dH\right|_N=0,$ i.e. $t=t(H)$ on $N,$ (the period depends only on the energy.)

Question
In Guillemin, Stenberg, Geometric Asymptotics, between pages 170-171, I have additionally found that, when all integral curves of $X_H$ are periodic, we can take $N=\text{per}$ in $(\ast),$ which should mean that in such a case $\text{per}$ is a smooth submanifold of $\mathbb R\times M.$  
In order to justify this last point I was wondering myself:

  
*
  
*If $X$ is a non singular vector field on $M,$ all of whose integral curves are periodic, and $\tau(p)$ denotes the period of the orbit through $p,$ then $\tau:M\to\mathbb R$ is smooth? 
  
*otherwise, how to prove that in such a case $\text{per}$ is a submanifold?
  

What I have tried about point 2
Probably I am missing something because my guess is that if there were a principal bundle structure $(M,p,X,\mathbb S^1)$ such that the $\mathbb S^1$-orbits are the trajectories of $X$ then the period $\tau:M\to\mathbb R$ should be smooth because of the relation $\zeta=\tau X_H,$ where $\zeta$ is the infinitesimal generator of the action.
But I don't know how to proceed without this additional hypothesis.  
Edit1 (After Sebastian's answer about point 1): As illustration of my difficulties with point 1, I imagine that $M$ is the Moebius band $[0,1]\times\mathbb R/\sim$ and $X=\frac{\partial}{\partial x}$ then the period is $$\tau([(x,y)]_{\sim})=\begin{cases}1&\text{if }y=0\\\2&\text{if }y\neq 0\end{cases}$$

 A: Sam is completely right. In general, the period function $\tau\colon M\to\mathbb{R}$ is not even continuous. 
A very nice reference for a (counter-)example to Giuseppe's question is the paper A counterexample to the periodic orbit conjecture, by Dennis Sullivan. In the paper, Sullivan constructs a singularity-free flow on a compact 5-manifold such that all its orbits are periodic and function $\tau$ is unbounded!
A: You are confusing minimal period and period.  The function $\tau(p)$ you computed on $M$ is the minimal period, which is a well-defined function, but is only lower semi-continuous.  The period as discussed by Sebastian is only locally defined, and is actually multivalued if you think of it globally.  
This multivalued period is what per is about. In your Moebius band example, every point has period 2 (also 4, 6, 8...), though the 0-section has minimal period 1 (I denote the 0 section by $\mathbf{0}$. 
Then, per consists of
$\bigcup_{k \ge 1} \{ 2k-1 \} 
 \times \mathbf{0} \cup \bigcup_{k \ge 1} \{ 2k \} \times M \subset \mathbb{R} \times M
$
A: Let $p\in M$ be a point such that $\Phi_t(p)=p.$ Let $U\subset M$ be a small neighborhood of $p$ and $N\subset U$ be a hypersurface such that $X$ is transversal to $N.$ Let $f\colon V\subset\mathbb R^{n-1}$ be a local parametrization of $N$ with $f(0)=p.$ Then
$$F\colon\mathbb (t-\epsilon,t+\epsilon)\times V\to M;F(t,x)=\Phi_t(f(x))$$ is a local diffeomorphism to an open neighborhood of $p$ in $M.$ The preimage of $N$ by $F$ is a graph of a function  from $\mathbb{R}^{n-1},$ the space where x libes in, to $\mathbb R,$ the space where t lives in. This function is exactly the "time period" function you look for.
