in reply to Filenames based on timestamp
The easiest way that comes off the top of my head would be to gather the date/time information down to as far as you can, and then apply a tie breaker byte to the filename that you increment with each file you create. This way in the instance that you do create files within the given interval, you have the tiebreaker to ensure that the filename will be unique. Obviously the tiebreaker does not have to be 1 byte, but that is just how I have done it in the past.
Hope this gives you a couple hints.
thanks
krazken