In machinery maintenance policies, regular inspection intervals should be specified in such a way that the cumulative of direct and indirect financial consequences of maintenance activities should be minimized while supporting the functional health of system components. This study aims to develop a simulation algorithm, called the time-counter, to optimize inspection intervals. In the algorithm, uptime and downtime behaviors of the system components and production losses in the corrective repairs are considered random values. Delay time concept is regarded when estimating failure detection periods and deciding on the required maintenance type. In addition, the developed model is applied to two active draglines and their inspection intervals are optimized as 232 and 184 h for Dragline-1 and Dragline-2, respectively. The optimized values are observed to decrease the total maintenance costs by 5.9 and 6.2 percent for the given draglines, compared to the current interval of 160 h. The main novelties of the study are that (i) the proposed concept which allows for simultaneous assessment of system components in an incremental time span has not been proposed in the literature when deciding on optimal inspection intervals, (ii) it is the first initiative in inspection optimization of a mining machinery system, and (iii) it uses real datasets on lifetime, repair time, and financial values that are rarely observed in maintenance studies. (C) 2017 Elsevier Ltd. All rights reserved.