Browse Source

Merge commit '79df6b9' into cg_merges_20130524b

Conflicts:
	driver-icarus.c
Luke Dashjr 12 years ago
parent
commit
f55446496f
1 changed files with 6 additions and 6 deletions
  1. 6 6
      driver-icarus.c

+ 6 - 6
driver-icarus.c

@@ -242,7 +242,7 @@ int icarus_gets(unsigned char *buf, int fd, struct timeval *tv_finish, struct th
 			return ICA_GETS_ERROR;
 
 		if (first)
-			gettimeofday(tv_finish, NULL);
+			cgtime(tv_finish);
 
 		if (ret >= read_amount)
 		{
@@ -576,7 +576,7 @@ bool icarus_detect_custom(const char *devpath, struct device_drv *api, struct IC
 
 	hex2bin(ob_bin, golden_ob, sizeof(ob_bin));
 	icarus_write(fd, ob_bin, sizeof(ob_bin));
-	gettimeofday(&tv_start, NULL);
+	cgtime(&tv_start);
 
 	memset(nonce_bin, 0, sizeof(nonce_bin));
 	icarus_gets(nonce_bin, fd, &tv_finish, NULL, 1);
@@ -672,7 +672,7 @@ static bool icarus_prepare(struct thr_info *thr)
 	icarus->device_fd = fd;
 
 	applog(LOG_INFO, "Opened Icarus on %s", icarus->device_path);
-	gettimeofday(&now, NULL);
+	cgtime(&now);
 	get_datestamp(icarus->init, &now);
 
 	struct icarus_state *state;
@@ -766,7 +766,7 @@ static bool icarus_start_work(struct thr_info *thr, const unsigned char *ob_bin)
 	int ret;
 	char *ob_hex;
 
-	gettimeofday(&state->tv_workstart, NULL);
+	cgtime(&state->tv_workstart);
 
 	ret = icarus_write(fd, ob_bin, 64);
 	if (ret) {
@@ -996,7 +996,7 @@ static int64_t icarus_scanhash(struct thr_info *thr, struct work *work,
 	&&  !was_hw_error
 	&&  ((nonce & info->nonce_mask) > END_CONDITION)
 	&&  ((nonce & info->nonce_mask) < (info->nonce_mask & ~END_CONDITION))) {
-		gettimeofday(&tv_history_start, NULL);
+		cgtime(&tv_history_start);
 
 		history0 = &(info->history[0]);
 
@@ -1085,7 +1085,7 @@ static int64_t icarus_scanhash(struct thr_info *thr, struct work *work,
 					Hs, W, read_count, fullnonce);
 		}
 		info->history_count++;
-		gettimeofday(&tv_history_finish, NULL);
+		cgtime(&tv_history_finish);
 
 		timersub(&tv_history_finish, &tv_history_start, &tv_history_finish);
 		timeradd(&tv_history_finish, &(info->history_time), &(info->history_time));