Discretized Lyapunov functional for systems with distributed delay