There is no check or guard on the first digitalWrite, it's unconditional. Since you also unconditionally set ledontime = currentTime at the end of the function, the conditional statements never become true because the difference between currentTime and ledontime is never greater than a few milliseconds.
Unless I've missed something...
BTW this is not the approach I would take at all.