use SMGLog;
use Math::Round qw(nearest);
use File::Copy;
+use Data::Random qw(rand_chars);
use constant pi => 3.14159265358979;
close $dataf if $dataf;
# move all the files along one
-copy "$datafn.oooo", "$datafn.ooooo";
-copy "$datafn.ooo", "$datafn.oooo";
-copy "$datafn.oo", "$datafn.ooo";
-copy "$datafn.o", "$datafn.oo";
-copy $datafn, "$datafn.o";
-
+cycle_loop_data_files();
dbg '***';
dbg "*** ending $0";
print $dataf "$s\n";
}
+sub cycle_loop_data_files
+{
+ rename "$datafn.oooo", "$datafn.ooooo";
+ rename "$datafn.ooo", "$datafn.oooo";
+ rename "$datafn.oo", "$datafn.ooo";
+ rename "$datafn.o", "$datafn.oo";
+ copy $datafn, "$datafn.o";
+}
__DATA__
<th>Minute Avg:<td> <span id="Wind_1m"> </span>
<tr>
-<th>Rain Hour:<td> <span id="Rain_1h"> </span>
+<th>Rain 30mins:<td> <span id="Rain_1h"> </span>
<th>Day:<td> <span id="Rain_Day"> </span>
<th>24hrs:<td> <span id="Rain_24h"> </span>
<th>Month:<td> <span id="Rain_Month"> </span>