Does that makes more sense?
Not really, since you specifically said that you wanted to time the knocks.
Knowing how long a light is on is easy enough. On some pass through loop(), you may see that the light level has risen above some threshold. If that happens, record the time, using millis() or micros(). On some pass through loop(), you may see that the light level has dropped below some threshold. If that happens, record the time, using millis() or micros().
The difference between the times is the time that the light level was above the threshold.