fix uptime calcuations
This commit is contained in:
parent
beeee24799
commit
2150a4832e
1 changed files with 7 additions and 0 deletions
7
stats.js
7
stats.js
|
@ -102,11 +102,18 @@ function calcStats(instance){
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
console.log(daytime);
|
||||||
instance.online=online;
|
instance.online=online;
|
||||||
alltime/=totalTimePassed;
|
alltime/=totalTimePassed;
|
||||||
if(totalTimePassed>1000*60*60*24){
|
if(totalTimePassed>1000*60*60*24){
|
||||||
|
if(daytime===-1){
|
||||||
|
daytime=online*1000*60*60*24;
|
||||||
|
}
|
||||||
daytime/=1000*60*60*24;
|
daytime/=1000*60*60*24;
|
||||||
if(totalTimePassed>1000*60*60*24*7){
|
if(totalTimePassed>1000*60*60*24*7){
|
||||||
|
if(weektime===-1){
|
||||||
|
weektime=online*1000*60*60*24*7;
|
||||||
|
}
|
||||||
weektime/=1000*60*60*24*7;
|
weektime/=1000*60*60*24*7;
|
||||||
}else{
|
}else{
|
||||||
weektime=alltime;
|
weektime=alltime;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue