mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 06:33:56 +00:00
add millisleep func and update godoc
This commit is contained in:
parent
cd784a6758
commit
f71b00e6b9
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user