Properly check for miliseconds during screen update

This removes undefined behavior in the previous code by properly
checking for miliseconds (actually typing proper names, not abusing
pointer arithmetics).