[Midnightbsd-cvs] src [6958] trunk/lib/libstand/twiddle.c: skip printing the twiddle as frequently.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Dec 14 10:11:44 EST 2014


Revision: 6958
          http://svnweb.midnightbsd.org/src/?rev=6958
Author:   laffer1
Date:     2014-12-14 10:11:43 -0500 (Sun, 14 Dec 2014)
Log Message:
-----------
skip printing the twiddle as frequently.  this speeds up serial output for boots on consoles

Modified Paths:
--------------
    trunk/lib/libstand/twiddle.c

Modified: trunk/lib/libstand/twiddle.c
===================================================================
--- trunk/lib/libstand/twiddle.c	2014-12-11 13:15:10 UTC (rev 6957)
+++ trunk/lib/libstand/twiddle.c	2014-12-14 15:11:43 UTC (rev 6958)
@@ -46,7 +46,11 @@
 twiddle()
 {
 	static int pos;
+	static int divisor;
 
-	putchar("|/-\\"[pos++ & 3]);
-	putchar('\b');
+	if (divisor-- == 0) {
+		divisor = 32;
+		putchar("|/-\\"[pos++ & 3]);
+		putchar('\b');
+	}
 }



More information about the Midnightbsd-cvs mailing list