Skip to content

Commit 362465d

Browse files
misc
1 parent cb7fb80 commit 362465d

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

GeekTool/network.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656

5757
<script>
5858

59+
const BLOCK_TIME_ALERT = 120;
60+
5961
var solutionCount = __SolutionCount__;
6062
var blockOverdue = false;
6163
var blockTimeMs = null;
@@ -91,7 +93,7 @@
9193
document.getElementById("BlockTimeCounter").textContent = sMins + ':' + sSecs;
9294

9395
// check if over the time limit
94-
if (!blockOverdue && (blockTimeMs > (120 * 1000)))
96+
if (!blockOverdue && (blockTimeMs > (BLOCK_TIME_ALERT * 1000)))
9597
{
9698
document.getElementById("BlockTimeLabel").className += " Overdue";
9799
document.getElementById("BlockTimeCounter").className += " Overdue";

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Mining Visualizer comes with 4 desktop widgets that display various data items t
3737
![](https://github.com/mining-visualizer/Mining-Visualizer/wiki/images/widget_activity.png)
3838

3939
* **Last Solution** - the last time you mined a block
40-
* **Next Solution** - an estimate of when you will mine your next block, based on your current hash rate and the network difficulty. Remember, though, there is no guarantee that you will mine a block by this time. The generation of hashes (mining) is a completely random process. It is like rolling a dice. Variance will affect your mining results. Sometimes you will mine a block sooner, sometimes later.
40+
* **Next Solution** - an estimate of when you will mine your next block, based on your current hash rate and the network difficulty. Remember, though, there is no guarantee that you will mine a block by this time. The computation of hashes (mining) is a completely random process. It is like rolling a dice. Variance will affect your mining results. Sometimes you will mine a block sooner, sometimes later.
4141
* **Target** - the upper 64 bits of the current network Target. If your miner finds a hash value *lower* than the target, you will become the miner of the next block, and receive the appropriate reward.
4242
* **Best Hash**: the upper 64 bits of the best hash found by your mining rigs, since you last mined a block. Remember, lower is better.
4343

@@ -110,6 +110,7 @@ Full documentation is available in the [wiki](https://github.com/mining-visualiz
110110

111111
### Build From Source
112112

113+
* Clone the repository.
113114
* Download and install [Lazarus Pascal](https://www.lazarus-ide.org).
114115
* Launch the Lazarus Pascal IDE and use it to open `MiningVisualizer.lpi`.
115116
* Select *Run / Compile* from the menu.

Rainmeter/Skins/MVis/@Resources/MVis.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ end
66

77
function Update()
88

9+
local BLOCK_TIME_ALERT = 120
10+
911
if SELF:GetName() == "Measure_BlockTimeCounter" then
10-
-- read the value of Measure_BlockTime and display it as minutes:seconds. after 180 seconds, turn the
12+
-- read the value of Measure_BlockTime and display it as minutes:seconds. after 120 seconds, turn the
1113
-- display red.
1214
local measure = SKIN:GetMeasure('Measure_BlockTime')
1315
local s = measure:GetStringValue()
@@ -16,7 +18,7 @@ function Update()
1618
end
1719
local d = ParseDate(s)
1820
seconds = os.time() - d
19-
if seconds < 120 then
21+
if seconds < BLOCK_TIME_ALERT then
2022
SKIN:Bang('!SetOption', 'Meter_BlockTimeLabel', 'MeterStyle', 'BodyStyle')
2123
SKIN:Bang('!SetOption', 'Meter_BlockTimeValue', 'MeterStyle', 'BodyStyle')
2224
else

src/uGeekTool.pas

+4
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ function CWidget.widgetOnline: boolean;
296296
process: TProcess;
297297
res: TStringlist;
298298
begin
299+
{$IFDEF Darwin}
299300
process := TProcess.Create(nil);
300301
process.Executable := 'osascript';
301302
process.Parameters.Add(ConcatPaths([getResourcesFolder, 'GeekTool', 'is_geektool_running.scpt']));
@@ -306,6 +307,9 @@ function CWidget.widgetOnline: boolean;
306307
result := (res.Count > 0) and (res[0] = 'Yes');
307308
res.Free;
308309
process.Free;
310+
{$ELSE}
311+
result := true;
312+
{$ENDIF}
309313
end;
310314

311315
procedure CWidget.refreshGeeklet(name: string);

0 commit comments

Comments
 (0)