diff --git a/robotgo.go b/robotgo.go index 065561e..724b4c2 100644 --- a/robotgo.go +++ b/robotgo.go @@ -112,8 +112,13 @@ func Try(fun func(), handler func(interface{})) { fun() } -// Sleep time.Sleep -func Sleep(tm float64) { +// MilliSleep sleep tm milli second +func MilliSleep(tm int) { + time.Sleep(time.Duration(tm) * time.Millisecond) +} + +// Sleep time.Sleep tm second +func Sleep(tm int) { time.Sleep(time.Duration(tm) * time.Second) }