| 39 | const DISPLAY_ERROR_TIME = 10 |
| 40 | |
| 41 | type KeyboardError struct { |
| 42 | err error |
| 43 | timeStart time.Time |
| 44 | } |
| 45 | |
| 46 | func (ke *KeyboardError) shouldDisplay() bool { |
| 47 | return ke.err != nil && int(time.Since(ke.timeStart).Seconds()) < DISPLAY_ERROR_TIME |
nothing calls this directly
no outgoing calls
no test coverage detected