mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-24 02:08:33 +00:00
add millisleep func and update godoc
This commit is contained in:
parent
cd784a6758
commit
f71b00e6b9
1 changed files with 7 additions and 2 deletions
|
|
@ -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 a new issue