fixed 100% CPU load issue
This commit is contained in:
parent
47fda6a514
commit
7bd8757458
@ -50,14 +50,8 @@ func main() {
|
|||||||
}
|
}
|
||||||
go proxy.Start_client(daemon_address, proxy.Address)
|
go proxy.Start_client(daemon_address, proxy.Address)
|
||||||
|
|
||||||
var current_time time.Time
|
|
||||||
last_time := time.Now()
|
|
||||||
//fmt.Printf("%4d miners connected\t\tBlocks:%4d\tMiniblocks:%4d\tRejected:%4d\n", proxy.CountMiners(), proxy.Blocks, proxy.Minis, proxy.Rejected)
|
|
||||||
for {
|
for {
|
||||||
current_time = time.Now()
|
time.Sleep(time.Minute)
|
||||||
if current_time.Sub(last_time) >= time.Minute {
|
fmt.Printf("%4d miners connected\t\tBlocks:%4d\tMiniblocks:%4d\tRejected:%4d\n", proxy.CountMiners(), proxy.Blocks, proxy.Minis, proxy.Rejected)
|
||||||
fmt.Printf("%4d miners connected\t\tBlocks:%4d\tMiniblocks:%4d\tRejected:%4d\n", proxy.CountMiners(), proxy.Blocks, proxy.Minis, proxy.Rejected)
|
|
||||||
last_time = time.Now()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user