isScreenStableLocked returns true if the screen content has been stable for the required number of snapshots. Caller MUST hold c.lock.
()
| 535 | // isScreenStableLocked returns true if the screen content has been stable |
| 536 | // for the required number of snapshots. Caller MUST hold c.lock. |
| 537 | func (c *PTYConversation) isScreenStableLocked() bool { |
| 538 | snapshots := c.snapshotBuffer.GetAll() |
| 539 | if len(snapshots) < c.stableSnapshotsThreshold { |
| 540 | return false |
| 541 | } |
| 542 | for i := 1; i < len(snapshots); i++ { |
| 543 | if snapshots[0].screen != snapshots[i].screen { |
| 544 | return false |
| 545 | } |
| 546 | } |
| 547 | return true |
| 548 | } |
| 549 | |
| 550 | // caller MUST hold c.lock |
| 551 | func (c *PTYConversation) statusLocked() ConversationStatus { |
no test coverage detected