add millisleep func and update godoc

This commit is contained in:
vcaesar 2018-12-12 16:58:23 -04:00
parent cd784a6758
commit f71b00e6b9

View File

@ -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)
}