  The algorithm of the ensemble pulsar time based on the optimal Wiener
filtration method has been constructed. This algorithm allows the separation of
the contributions to the post-fit pulsar timing residuals of the atomic clock
and pulsar itself. Filters were designed with the use of the cross- and
autocovariance functions of the timing residuals. The method has been applied
to the timing data of millisecond pulsars PSR B1855+09 and PSR B1937+21 and
allowed the filtering out of the atomic scale component from the pulsar data.
Direct comparison of the terrestrial time TT(BIPM06) and the ensemble pulsar
time PT$_{\rm ens}$ revealed that fractional instability of
TT(BIPM06)--PT$_{\rm ens}$ is equal to $\sigma_z=(0.8\pm 1.9)\cdot 10^{-15}$.
Based on the $\sigma_z$ statistics of TT(BIPM06)--PT$_{\rm ens}$ a new limit of
the energy density of the gravitational wave background was calculated to be
equal to $\Omega_g h^2 \sim 3\cdot 10^{-9}$.
