BEGIN{ $t0 = [gettimeofday]; } use my_module; $elapsed = tv_interval( $t0, [gettimeofday] );