MCPcopy Create free account
hub / github.com/DNAProject/DNA / AppendNewReqtime

Method AppendNewReqtime

p2pserver/block_sync.go:100–103  ·  view source on GitHub ↗

AppendNewReqTime append new request time

()

Source from the content-addressed store, hash-verified

98
99//AppendNewReqTime append new request time
100func (this *NodeWeight) AppendNewReqtime() {
101 copy(this.reqTime[0:SYNC_NODE_RECORD_TIME_CNT-1], this.reqTime[1:])
102 this.reqTime[SYNC_NODE_RECORD_TIME_CNT-1] = time.Now().UnixNano() / int64(time.Millisecond)
103}
104
105//addNewSpeed apend the new speed to tail, remove the oldest one
106func (this *NodeWeight) AppendNewSpeed(s float32) {

Callers 1

appendReqTimeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected