threads and getlocaltime

Discussion in 'Perl Misc' started by Charlie, Jul 2, 2004.

  1. Charlie

    Charlie Guest

    Hi folks,

    In one of my perl code, I am trying to get the local time in mseconds.
    The module I am using are from CPAN, Time::Format. It works fine in
    the regular code, but if I create some threads inside the code and
    have the $time() being called in the threads, it causes the segment
    fault.

    So the question I have is does anyone know other api that I can use,
    which give me the local time in mseconds and is thread safe ?


    regards,


    Charlie.
     
    Charlie, Jul 2, 2004
    #1
    1. Advertising

  2. Charlie wrote:
    > So the question I have is does anyone know other api that I can
    > use, which give me the local time in mseconds and is thread safe ?


    Have you tried Time::HiRes?

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Jul 3, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. yoda
    Replies:
    2
    Views:
    445
    =?utf-8?Q?Bj=C3=B6rn_Lindstr=C3=B6m?=
    Aug 1, 2005
  2. Ever Olano

    GetLocalTime() for Linux/Unix

    Ever Olano, Jun 30, 2004, in forum: C Programming
    Replies:
    2
    Views:
    1,587
    Ever Olano
    Jun 30, 2004
  3. threads without threads

    , Aug 27, 2004, in forum: C Programming
    Replies:
    4
    Views:
    411
    William Ahern
    Aug 27, 2004
  4. Pedro Pinto

    Java Threads - Get running threads

    Pedro Pinto, Apr 8, 2008, in forum: Java
    Replies:
    2
    Views:
    1,454
    Arne Vajhøj
    Apr 9, 2008
  5. Une bévue
    Replies:
    0
    Views:
    156
    Une bévue
    Jun 14, 2006
Loading...

Share This Page