Outside a situation that expects a bareword (such as the LHS of => and print's first argument), a bareword is compiled into a function call only if a function by that name exists at that time. Otherwise, it is compiled as a string constant (strict off) or results in an error (strict on).
use executes as soon as it compiles, so the function it imports are present before the rest of the file is compiled. However, you deferred the execution of use to when the eval is executed, which is only after the entire file (including what you want to be a call to gettimeofday) has been compiled.
Remember that use Module; is the same as BEGIN { require Module; import Module; }, so the solution is to reintroduce BEGIN. Put a BEGIN block around the while and you'll get the desired behaviour. The loop will execute as soon as it finishes compiling, which is before the compiler reaches "gettimeofday".
Update: Reorganized text to improve readability.