in reply to Re: Get Exact Time w/out Modules
in thread Get Exact Time w/out Modules

The code is going to be running on an proprietary embedded device. To add software to the image that it runs requires me to pay a hefty sum of money. It has perl already, but no modules.

Replies are listed 'Best First'.
Re: Re: Re: Get Exact Time w/out Modules
by simonm (Vicar) on Nov 18, 2003 at 00:21 UTC

    If you can't compile libraries, I think you're limited to the time() function and its one second accuracy. (You might be able to qx() out to a command-line program that returned the time with hundredths of a second precision, but that'd probably take long enough that it would throw off your timing.

    Update: Or, as mpeppler points out, you could use syscall(). It sounds like your manufacturer probably didn't include the headers or syscall.ph, but if they did this would be a good workaround.

Re: Re: Re: Get Exact Time w/out Modules
by Anonymous Monk on Nov 17, 2003 at 20:03 UTC
    then you should consider getting rid of this proprietary device and going for something else. this kind of restrictiveness is like have a 10 ton block of cement chained to your ankle; you will never be able to get anywhere or do anything while you are still tied to it!
      Sadly, in the business world this isn't an option. Already too much money tied up in it by upper management.