Correct share work tdiff
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)