how to make something time sensitive??

Vref = 5V, Vin = 5V. Then analogRead() returns 1023.
MeasuredVoltage = analogRead()Vref/1024 = 10235/1024 = 4.9951171875
error = |Vin - MeasuredVoltage| = 0.0048828125 > 0

Not error-free -> not correct.
Q.E.D.

Not really QED, because you haven't started your assumption that a successive approximation ADC can read up to and including Vref.