Estimation of the time cost with pinning control for stochastic complex networks