MCPcopy Create free account
hub / github.com/bwapi/bwapi / getLatency

Method getLatency

bwapi/BWAPI/Source/BWAPI/GameImpl.cpp:89–123  ·  view source on GitHub ↗

---------------------------------------------- GET LATENCY -----------------------------------------------

Source from the content-addressed store, hash-verified

87 }
88 //---------------------------------------------- GET LATENCY -----------------------------------------------
89 int GameImpl::getLatency() const
90 {
91 // Returns the real latency values
92 if ( !this->isMultiplayer() )
93 return BWAPI::Latency::SinglePlayer;
94
95 if ( this->isBattleNet() )
96 {
97 switch(BW::BWDATA::Latency)
98 {
99 case 0:
100 return BWAPI::Latency::BattlenetLow;
101 case 1:
102 return BWAPI::Latency::BattlenetMedium;
103 case 2:
104 return BWAPI::Latency::BattlenetHigh;
105 default:
106 return BWAPI::Latency::BattlenetLow;
107 }
108 }
109 else
110 {
111 switch(BW::BWDATA::Latency)
112 {
113 case 0:
114 return BWAPI::Latency::LanLow;
115 case 1:
116 return BWAPI::Latency::LanMedium;
117 case 2:
118 return BWAPI::Latency::LanHigh;
119 default:
120 return BWAPI::Latency::LanLow;
121 }
122 }
123 }
124 //--------------------------------------------- GET FRAME COUNT --------------------------------------------
125 int GameImpl::getFrameCount() const
126 {

Callers 7

updateSharedMemoryMethod · 0.45
updateMethod · 0.45
updateMethod · 0.45
updateMethod · 0.45
updateMethod · 0.45
updateMethod · 0.45
updateMethod · 0.45

Calls 2

isMultiplayerMethod · 0.95
isBattleNetMethod · 0.95

Tested by 6

updateMethod · 0.36
updateMethod · 0.36
updateMethod · 0.36
updateMethod · 0.36
updateMethod · 0.36
updateMethod · 0.36