movenc: factorize calculation of cluster duration into a separate function