+void lprocfs_stats_header(struct seq_file *seq, ktime_t now, ktime_t ts_init,
+ int width, const char *colon, bool show_units)
+{
+ const char *units = show_units ? " secs.nsecs" : "";
+ struct timespec64 ts;
+
+ ts = ktime_to_timespec64(now);
+ seq_printf(seq, "%-*s%s %llu.%09lu%s\n", width,
+ "snapshot_time", colon, (s64)ts.tv_sec, ts.tv_nsec, units);
+ ts = ktime_to_timespec64(ts_init);
+ seq_printf(seq, "%-*s%s %llu.%09lu%s\n", width,
+ "start_time", colon, (s64)ts.tv_sec, ts.tv_nsec, units);
+ ts = ktime_to_timespec64(ktime_sub(now, ts_init));
+ seq_printf(seq, "%-*s%s %llu.%09lu%s\n", width,
+ "elapsed_time", colon, (s64)ts.tv_sec, ts.tv_nsec, units);
+}
+EXPORT_SYMBOL(lprocfs_stats_header);
+