Commit 41f099edffe8ff39514e11c0f1233366a8b76a89

Kano 2013-03-03T19:53:34

API - return Last Valid Work

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/api.c b/api.c
index e23548a..44cbf7f 100644
--- a/api.c
+++ b/api.c
@@ -1516,6 +1516,7 @@ static void gpustatus(struct io_data *io_data, int gpu, bool isjson, bool precom
 		root = api_add_diff(root, "Difficulty Accepted", &(cgpu->diff_accepted), false);
 		root = api_add_diff(root, "Difficulty Rejected", &(cgpu->diff_rejected), false);
 		root = api_add_diff(root, "Last Share Difficulty", &(cgpu->last_share_diff), false);
+		root = api_add_time(root, "Last Valid Work", &(cgpu->last_device_valid_work), false);
 
 		root = print_data(root, buf, isjson, precom);
 		io_add(io_data, buf);
@@ -1587,6 +1588,7 @@ static void pgastatus(struct io_data *io_data, int pga, bool isjson, bool precom
 #if defined(USE_MODMINER) || defined(USE_BITFORCE)
 		root = api_add_bool(root, "No Device", &(cgpu->usbinfo.nodev), false);
 #endif
+		root = api_add_time(root, "Last Valid Work", &(cgpu->last_device_valid_work), false);
 
 		root = print_data(root, buf, isjson, precom);
 		io_add(io_data, buf);