I have a script which prints out a map using data from a mysql database. As the database gets bigger and bigger, the map is taking longer to plot - to long in fact. So I need to find out where in my script most of my time is being lost. I'd like to print messages to a log file, including a time stamp relating to when this message was printed. What would be a good time function for doing this? I've only ever used localtime(time) before. Am I going about this in the right fashion?
Barry.