diff --git a/README.md b/README.md index a930212..48717a4 100644 --- a/README.md +++ b/README.md @@ -249,7 +249,7 @@ func main() { ## Plans - Update Find an image on screen, read pixels from an image - Update Window Handle -- Support UTF-8, transitional plan: TypeStr +- Linux support UTF-8 - Try support Android, maybe support IOS ## Donate diff --git a/README_zh.md b/README_zh.md index 8d1f66e..e2d6c34 100644 --- a/README_zh.md +++ b/README_zh.md @@ -247,7 +247,7 @@ func main() { ## Plans - 更新 Find an image on screen, read pixels from an image - 更新 Window Handle -- 支持 UTF-8, 过渡方案: TypeStr +- Linux 支持 UTF-8 - 尝试支持 Android, 也许支持 IOS ## Donate diff --git a/robotgo.go b/robotgo.go index a4e0a03..3ec5aa6 100644 --- a/robotgo.go +++ b/robotgo.go @@ -54,6 +54,7 @@ import ( "reflect" "runtime" "strings" + "time" "unsafe" // "syscall" @@ -62,7 +63,7 @@ import ( ) const ( - version string = "v0.47.0.481, Mount Cook!" + version string = "v0.47.0.485, Mount Cook!" ) type ( @@ -105,6 +106,11 @@ func Try(fun func(), handler func(interface{})) { fun() } +// Sleep time.Sleep +func Sleep(tm float64) { + time.Sleep(time.Duration(tm) * time.Second) +} + // GoString teans C.char to string func GoString(char *C.char) string { return C.GoString(char)