Commit 5d3faba603f2e1e127feeb4703624cc6d775432e

Kano 2013-03-03T20:30:44

miner.php report 'Last Valid Work' as time before request

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/miner.php b/miner.php
index dd9ff39..8e79c68 100644
--- a/miner.php
+++ b/miner.php
@@ -641,6 +641,14 @@ function fmt($section, $name, $value, $when, $alldata)
 			$class = classlastshare($when, $alldata, $warnclass, $errorclass);
 		}
 		break;
+	case 'GPU.Last Valid Work':
+	case 'PGA.Last Valid Work':
+	case 'DEVS.Last Valid Work':
+		if ($value == 0)
+			$ret = 'Never';
+		else
+			$ret = ($value - $when) . 's';
+		break;
 	case 'POOL.Last Share Time':
 		if ($value == 0)
 			$ret = 'Never';