The paper is devoted to the method of determining the simulation duration sufficient for estimating of unknown parameters of the distribution law for given values of the relative error and the confidence level. The method is developed for nonnegative random variables, for nonnegative regenerating sequence and for nonnegative regenerating piecewise-constant process. An algorithm for simulation a piecewise constant random process is proposed, the result of which is the number of experiments or the duration of the simulation as well as the estimates of unknown parameters obtained as a result of simulation. The results of numerical experiments illustrating the application of the method for determining the simulation duration are given for a predetermined relative error and confidence level. For the examples, two distributions are chosen from the families of one-parameter and two - from two-parameter distributions. The simulation of random variables with the chosen distributions took into account the simulation duration, sufficient for estimating the unknown parameters of the distribution law for given relative error and confidence level. For chosen distributions, series of experiments were performed at different values of the relative error and the confidence probability. Copyright © 2018 for the individual papers by the papers' authors.