/* swsusp_show_speed - print the time elapsed between two events. @start: Starting event. @stop: Final event. @nr_pages - number of pages processed between @start and @stop @msg - introductory message to print  */
void swsusp_show_speed(struct timeval *start, struct timeval *stop, unsigned nr_pages, char *msg)
/* swsusp_show_speed - print the time elapsed between two events. @start: Starting event. @stop: Final event. @nr_pages - number of pages processed between @start and @stop @msg - introductory message to print  */
void swsusp_show_speed(struct timeval *start, struct timeval *stop, unsigned nr_pages, char *msg)
{
	s64 elapsed_centisecs64;
	int centisecs;
	int k;
	int kps;
	elapsed_centisecs64 = timeval_to_ns(stop) - timeval_to_ns(start);
	do_div(elapsed_centisecs64, NSEC_PER_SEC / 100);
	centisecs = elapsed_centisecs64;
	if (centisecs == 0)
		centisecs = 1;
	k = nr_pages * (PAGE_SIZE / 1024);
	kps = (k * 100) / centisecs;
	printk(KERN_INFO "PM: %s %d kbytes in %d.%02d seconds (%d.%02d MB/s)\n",
			msg, k,
			centisecs / 100, centisecs % 100,
			kps / 1000, (kps % 1000) / 10);
}