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

Hello All,
Anyone aware of a function in Perl that generates micro-seconds i.e. generate value for the last microsecond column -00:00 in the format below

2004-08-02T15:38:00-00:00

Thanks

Replies are listed 'Best First'.
Re: Microseconds in Per
by Tanalis (Curate) on Jun 14, 2005 at 14:33 UTC
      Unfortunately, HiRes doesn't work well on Windows machines, where it doesn't provide granularity better than ~ 30 ms. In fact, I've been continuously dissapointed trying to find good solutions for high resolution timers on Windows. Even calls to native Win32 didn't help - the 30 ms seems to be a magic barrier.
        Interesting.

        I've done some quick research into this, and it turns out that while it's possible to obtain a timestamp in Windows to 100-nanosecond accuracy, the value returned is only updated once each timer tick[1], or about once every 16 milliseconds.

        It'd seem that that update mechanism is the "magic barrier" you see. Cambridge University offer a solution to this, written in C++ - but whether that'd help you any I don't know :)

        1. http://www.cl.cam.ac.uk/users/kw217/useful/win32time.html

Re: Microseconds in Per
by cog (Parson) on Jun 14, 2005 at 14:34 UTC
Re: Microseconds in Per
by longliveAJ (Acolyte) on Jun 14, 2005 at 18:05 UTC
    Thanks guys ...looking into it