Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hi Monks,

on my linux-system i get the desired highresoluted time-values which i want to use to generate reliable different filenames.

tos@tux ~/d/tsp/lab/dvlp/tos/too # uname -a && perl -v Linux tux 2.4.21-xfs #1 SMP Fre Jul 25 00:06:47 CEST 2003 i686 GNU/Lin +ux perl, v5.8.0 built for i386-linux-thread-multi # perl -we 'use Time::HiRes ("time");for ($i=1;$i<=10;$i++) {print tim +e,"\n"}' 1063031285.55356 1063031285.55394 1063031285.55404 1063031285.55414 1063031285.55423 1063031285.55432 1063031285.5545 1063031285.55462 1063031285.55472 1063031285.55481
Not so on the win2000/cygwin-system.
tos@SYS-10102 ~ # uname -a && perl -v CYGWIN_NT-5.1 SYS-10102 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 unknown + unknown Cygwin This is perl, v5.8.0 built for cygwin-multi-64int # perl -we 'use Time::HiRes ("time");for ($i=1;$i<=10;$i++) {print tim +e,"\n"}' 1063032731.06805 1063032731.06805 1063032731.06805 1063032731.06805 1063032731.06805 1063032731.06805 1063032731.06805 1063032731.06805 1063032731.06905 1063032731.06905
It appears that here the resolution is only 1/1000 second.

Any explanations for this behavior

greetings, tos


In reply to Time::HiRes not that high on windows by tos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-25 07:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found