I was thinking this over the other day - something like this would likely work with the slowest iphone "shutter" speed, and measure how much of the light is scanned. The iPhone has such a low scan rate for the sensor though (that's why you get "jello" when you move the phone - things like phone poles become slanted). I doubt the sensor is scanned fast enough to do faster shutter speeds.

Ever slide a document around on a xerox machine or scanner bed while the light is moving across the glass? That's essentially what happens with digital sensors (they're moving much faster, but same effect).

But the calculation would likely be based on "size" - how many rows of pixels get illuminated, divided by the sensor scan time. Which would likely change based on distance between the shutter and the phone's camera. My best guess anyway.