$OpenBSD: patch-vi_vs_msg_c,v 1.2 2013/06/19 18:48:22 sthen Exp $

Our timespecsub function takes three arguments, and CLOCK_PROF has been
removed.

--- vi/vs_msg.c.orig	Sun Oct  7 15:15:31 2012
+++ vi/vs_msg.c	Wed Jun 19 19:35:39 2013
@@ -91,7 +91,7 @@ vs_busy(SCR *sp, const char *msg, busy_t btype)
 
 		/* Initialize state for updates. */
 		vip->busy_ch = 0;
-		(void)clock_gettime(CLOCK_PROF, &vip->busy_ts);
+		(void)clock_gettime(CLOCK_MONOTONIC, &vip->busy_ts);
 
 		/* Save the current cursor. */
 		(void)gp->scr_cursor(sp, &vip->busy_oldy, &vip->busy_oldx);
@@ -124,9 +124,9 @@ vs_busy(SCR *sp, const char *msg, busy_t btype)
 			break;
 
 		/* Update no more than every 1/8 of a second. */
-		(void)clock_gettime(CLOCK_PROF, &ts);
+		(void)clock_gettime(CLOCK_MONOTONIC, &ts);
 		ts_diff = ts;
-		timespecsub(&ts_diff, &vip->busy_ts);
+		timespecsub(&ts_diff, &vip->busy_ts, &vip->busy_ts);
 		if (timespeccmp(&ts_diff, &ts_min, <))
 			return;
 		vip->busy_ts = ts;
