Commit 35263e07fa0ef7f298479f57e1de293a71c48c46

Con Kolivas 2014-02-23T16:48:50

Correct share work tdiff

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cgminer.c b/cgminer.c
index 899d1a1..148e242 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -6495,7 +6495,7 @@ static void gen_stratum_work(struct pool *pool, struct work *work)
  * get_work() and generated a valid share. */
 int share_work_tdiff(struct cgpu_info *cgpu)
 {
-	return cgpu->last_device_valid_work - cgpu->last_getwork;
+	return cgpu->last_getwork - cgpu->last_device_valid_work;
 }
 
 struct work *get_work(struct thr_info *thr, const int thr_id)