Update comments to reflect current implementation

This commit is contained in:
Chris Bednarski 2017-01-14 20:11:51 -08:00
parent ee2d636840
commit 6ad702ad74
2 changed files with 4 additions and 6 deletions

View File

@ -148,9 +148,8 @@ func vncSendString(c *vnc.ClientConn, original string) {
shiftedChars := "~!@#$%^&*()_+{}|:\"<>?"
waitRe := regexp.MustCompile(`^<wait([0-9hms]+)>`)
// Send the key events. We add a 100ms sleep after each key event
// to deal with network latency and the OS responding to the keystroke.
// It is kind of arbitrary but it is better than nothing.
// We delay (default 100ms) between each key event to allow for CPU or
// network latency. See PackerKeyEnv for tuning.
keyInterval := common.PackerKeyDefault
if delay, err := time.ParseDuration(os.Getenv(common.PackerKeyEnv)); err == nil {
keyInterval = delay

View File

@ -179,9 +179,8 @@ func vncSendString(c *vnc.ClientConn, original string) {
shiftedChars := "~!@#$%^&*()_+{}|:\"<>?"
// Send the key events. We add a 100ms sleep after each key event
// to deal with network latency and the OS responding to the keystroke.
// It is kind of arbitrary but it is better than nothing.
// We delay (default 100ms) between each key event to allow for CPU or
// network latency. See PackerKeyEnv for tuning.
keyInterval := common.PackerKeyDefault
if delay, err := time.ParseDuration(os.Getenv(common.PackerKeyEnv)); err == nil {
keyInterval = delay