module CoreExtensions
  module TimeClass
    # gives time in microseconds since unix epoch. good for filenames,
    # relatively short, and always unique
    def stamp
      now.strftime("%s%6N")
    end

    # stamp with milliseconds. better for things with length validations
    def short_stamp
      now.strftime("%s%3N")
    end
  end
end
