Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Yeah, this is a FAQ you might think, but I have to do it on HP-UX 10.20. The Time::HiRes module doesnīt want to install there (others do). Seems I have gettimeofday(2) on that f$%&īn box, but the trick using syscall(&SYS_getttimeofday, ...) as advised in the Camel book (see Ch. 29, syscall function example code) doesnīt work: Undefined subroutine &main::SYS_gettimeofday called at ./test.pl line 31.

Any other idea out there ? Iīm really desperate about that BS.
  • Comment on How to measure milliseconds with undefined sub from Camel book on HP-UX ?

Replies are listed 'Best First'.
Re: How to measure milliseconds with undefined sub from Camel book on HP-UX ?
by Fastolfe (Vicar) on Jan 23, 2001 at 02:24 UTC
    Do you have require 'syscall.ph'; in your code to import these constants? If this doesn't exist, perhaps you need to run h2ph to build it? See the documentation for syscall.
      require 'syscall.ph' seems to have been the point. Today I replaced it by require '/home/users/mg/tmp/sys/syscall.ph' (where I generated syscall.ph yesterday with h2ph) and then the error msg mutated into syntax error at _h2ph_pre.ph line 2, near ".1(". So I commented out two funny lines in /home/users/mg/tmp/_h2ph_pre.ph (itīs not in dir sys):
      #unless (defined &A1.1) { sub A1.1() { 1 } }
      #unless (defined &S1.1) { sub S1.1() { 1 } }
      ...and now it works!. I hope this doesnīt blow up some other gory detail.
      Thanks for your help.