// Sleep is a convenience function for those odd occasions when you
// need to drop in a sleep, e.g. waiting for CursorHold to trigger
Sleep is a convenience function for those odd occasions when you
need to drop in a sleep, e.g. waiting for CursorHold to trigger
// Sleep is a convenience function for those odd occasions when you // need to drop in a sleep e . g . waiting for CursorHold to trigger
func Sleep(ts *testscript.TestScript, neg bool, args []string) {
	if neg {
		ts.Fatalf("sleep does not support neg")
	}
	if len(args) != 1 {
		ts.Fatalf("sleep expects a single argument; got %v", len(args))
	}
	d, err := time.ParseDuration(args[0])
	if err != nil {
		ts.Fatalf("failed to parse duration %q: %v", args[0], err)
	}
	time.Sleep(d)
}
func Sleep ( ts * testscript . TestScript , neg bool , args [ ] string ) { if neg { ts . Fatalf ( " " ) } if len ( args ) != 1 { ts . Fatalf ( " " , len ( args ) ) } d , err := time . ParseDuration ( args [ 0 ] ) if err != nil { ts . Fatalf ( " " , args [ 0 ] , err ) } time . Sleep ( d ) }
Sleep is a convenience function for those odd occasions when you
need to drop in a sleep, e.g.
Sleep is a convenience function for those odd occasions when you need to drop in a sleep e . g .