add func microsleep and update

This commit is contained in:
vcaesar 2018-03-12 23:05:40 +08:00
parent 2423ad940d
commit 15afbb6132

View File

@ -65,7 +65,7 @@ import (
)
const (
version string = "v0.48.0.529, Ben Nevis!"
version string = "v0.48.0.534, Ben Nevis!"
)
type (
@ -113,6 +113,11 @@ func Sleep(tm float64) {
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
func GoString(char *C.char) string {
return C.GoString(char)