Fast way to grab current key state, checks and store them externaly.
(b *testing.B, mgr *KeyManager)
| 238 | |
| 239 | // Fast way to grab current key state, checks and store them externaly. |
| 240 | func checkKeyConfigOptimal(b *testing.B, mgr *KeyManager) { |
| 241 | for i, cd := range keySimpleCfg { |
| 242 | st := mgr.Get(cd) |
| 243 | keyResult[i].up = st.Up() |
| 244 | keyResult[i].down = st.Down() |
| 245 | keyResult[i].justUp = st.JustReleased() |
| 246 | keyResult[i].justDown = st.JustPressed() |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | // Benchmark state checks with a clean manager. |
| 251 | func BenchmarkKeyMgr_CleanState(b *testing.B) { |
no test coverage detected