mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-05 16:23:55 +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()
|
fun()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sleep time.Sleep
|
// MilliSleep sleep tm milli second
|
||||||
func Sleep(tm float64) {
|
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)
|
time.Sleep(time.Duration(tm) * time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user