Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Unique filenames with Time::HiRes

by adrianh (Chancellor)
on Jul 19, 2004 at 09:21 UTC ( [id://375502]=note: print w/replies, xml ) Need Help??


in reply to Re: Unique filenames with Time::HiRes
in thread Unique filenames with Time::HiRes

I would recommend that you look at Data::UUID

I'd second that. Works very well in my experience. Use the creation date of the files to order them.

(I'm assuming that your comments about multiple processes mean that the exact order isn't important.)

  • Comment on Re^2: Unique filenames with Time::HiRes

Replies are listed 'Best First'.
Re^3: Unique filenames with Time::HiRes
by bart (Canon) on Jul 19, 2004 at 11:56 UTC
    Use the creation date of the files to order them.
    Since he can create several files in a short interval, so that even Time::HiRes isn't updated quickly enough (update interval is 18 times a second, on Windows), and the resolution of creation date is in general only 1 or 2 seconds, I am certain you haven't solved the OP's problem.
      Since he can create several files in a short interval, so that even Time::HiRes isn't updated quickly enough (update interval is 18 times a second, on Windows), and the resolution of creation date is in general only 1 or 2 seconds, I am certain you haven't solved the OP's problem

      I am less certain of your certainty ;-)

      The OP apparently has multiple processes running that are dumping these files (my emphasis):

      command line interface gets called extremely often and often several for these processes run at the same time

      Which was why I said:

      (I'm assuming that your comments about multiple processes mean that the exact order isn't important.)

      The exact running order is going to be dependent on a lot of factors outside the OPs control. Depending on the exact requirements having unique filenames and a rough order may well be enough.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://375502]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found