I think it's important to measure what's actually relevant to the job. If the job entails large periods of coding on the whiteboard, then yes, it's a perfect metric.
If, however, the job requires careful consideration of dependencies, time domain, and, yes, edge cases - then you are NOT testing for that.
Lock the candidate in a room and give a few hours to let her to produce the result would be a better measurement.