Check the processing time
When creating a batch processing program, it is often the case that you want to know how long it took from the start of processing to the end of processing.
I would like to know how long it takes if I download a large zip file or insert a large amount of data into a database or the like.
In such a case, use time function to get the processing start time and hunting time to calculate the processing time.
# Start time my $start_time = time; # process ... # ending time my $end_time = time; # Elapsed seconds my $process_time = $end_time-$start_time; print "$process_time\n";
You can calculate how long it took to process by subtracting the start time from the end time.