This study proposes a new application for delay-dependent stability analysis of a shipboard microgrid system. Gain and phase margin values are taken into consideration in delay dependent stability analysis. Since such systems are prone to unwanted frequency oscillations against load disturbances and randomness of renewable resources, a virtual gain and phase margin tester has been incorporated into the system to achieve the desired stabilization specification. In this way, it is considered that the system provides the desired dynamic characteristics (e.g. less oscillation, early damping, etc.) in determining the time delay margin. Firstly, the time delay margin values are obtained and their accuracy in the terms of desired gain and phase margin values are investigated. Then, the accuracy of the time delay margin values obtained by using the real data of renewable energy sources and loads in the shipboard microgrid system is shown in the study. Finally, a real-time hardware-in-the-loop (HIL) simulation based on OPAL-RT is accomplished to affirm the applicability of the suggested method, from a systemic perspective, for the load frequency control problem in the shipboard microgrid.