Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Convert remaining modminer and bfl uses of usleep to nmsleep.

  • Loading branch information...
commit 86fd23a305504f3465b87d2e64339914a5750386 1 parent dc7fc13
Con Kolivas authored November 18, 2012
6  driver-bitforce.c
@@ -55,7 +55,7 @@ enum {
55 55
 #define BITFORCE_LONG_TIMEOUT_MS (BITFORCE_LONG_TIMEOUT_S * 1000)
56 56
 #define BITFORCE_CHECK_INTERVAL_MS 10
57 57
 #define WORK_CHECK_INTERVAL_MS 50
58  
-#define MAX_START_DELAY_US 100000
  58
+#define MAX_START_DELAY_MS 100
59 59
 #define tv_to_ms(tval) (tval.tv_sec * 1000 + tval.tv_usec / 1000)
60 60
 #define TIME_AVG_CONSTANT 8
61 61
 
@@ -691,9 +691,9 @@ static bool bitforce_thread_init(struct thr_info *thr)
691 691
 
692 692
 	/* Pause each new thread at least 100ms between initialising
693 693
 	 * so the devices aren't making calls all at the same time. */
694  
-	wait = thr->id * MAX_START_DELAY_US;
  694
+	wait = thr->id * MAX_START_DELAY_MS;
695 695
 	applog(LOG_DEBUG, "BFL%i: Delaying start by %dms", bitforce->device_id, wait / 1000);
696  
-	usleep(wait);
  696
+	nmsleep(wait);
697 697
 
698 698
 	return true;
699 699
 }
2  driver-modminer.c
@@ -604,7 +604,7 @@ static uint64_t modminer_process_results(struct thr_info *thr)
604 604
 
605 605
 		if (work_restart(thr))
606 606
 			break;
607  
-		usleep(10000);
  607
+		nmsleep(10);
608 608
 		if (work_restart(thr) || !--iter)
609 609
 			break;
610 610
 		mutex_lock(&modminer->device_mutex);

0 notes on commit 86fd23a

Please sign in to comment.
Something went wrong with that request. Please try again.