The measurement of the grid impedance is important for filter and control design, for active filter functionality of grid connected inverters and also for distribution network operators. It supports knowledge of the grid and design of decentralized energy generator power flow. Not only the impedance at fundamental frequency but also the impedance at harmonic and interharmonic frequencies is of common interest. With an inverter injecting a current at an individual frequency onto the power system, the real frequency dependent value of the grid impedance can be determined. A digital hysteresis current control is a promising method to control a voltage source inverter (VSI) for high frequency current generation in grid impedance measurement application. Digital signal processing is state of the art, but the speed of the analog to digital conversion is limited. When using hysteresis current control the outcome of this is that the current leaves the defined hysteresis band because of the time discrete sampling. In this paper a method using switching time prediction to minimize this current overshoot is proposed and analyzed. Simulation and measurement results are presented that show the suitability of this method.