Browse Source

Plan 9 from Bell Labs 2009-12-14

David du Colombier 14 years ago
parent
commit
de485fda07
1 changed files with 6 additions and 2 deletions
  1. 6 2
      sys/src/9/kw/clock.c

+ 6 - 2
sys/src/9/kw/clock.c

@@ -99,12 +99,16 @@ timerset(uvlong next)
 #endif
 }
 
+/*
+ * shift by 8 to provide enough resolution that dropping the tick rate
+ * won't mess up TOD calculation and cause infrequent clock interrupts.
+ */
 uvlong
 fastticks(uvlong *hz)
 {
 	if(hz)
-		*hz = HZ;
-	return m->fastclock;
+		*hz = HZ << 8;
+	return m->fastclock << 8;
 }
 
 ulong