mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
add func microsleep and update
This commit is contained in:
parent
2423ad940d
commit
15afbb6132
@ -65,7 +65,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
version string = "v0.48.0.529, Ben Nevis!"
|
version string = "v0.48.0.534, Ben Nevis!"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
@ -113,6 +113,11 @@ func Sleep(tm float64) {
|
|||||||
time.Sleep(time.Duration(tm) * time.Second)
|
time.Sleep(time.Duration(tm) * time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MicroSleep time C.microsleep(tm)
|
||||||
|
func MicroSleep(tm float64) {
|
||||||
|
C.microsleep(C.double(tm))
|
||||||
|
}
|
||||||
|
|
||||||
// GoString teans C.char to string
|
// GoString teans C.char to string
|
||||||
func GoString(char *C.char) string {
|
func GoString(char *C.char) string {
|
||||||
return C.GoString(char)
|
return C.GoString(char)
|
||||||
|
Loading…
Reference in New Issue
Block a user