mirror of
https://github.com/tursom/GoCollections.git
synced 2025-03-16 02:50:31 +08:00
22 lines
299 B
Go
22 lines
299 B
Go
package time
|
|
|
|
import "time"
|
|
|
|
func Sleep(d Duration) {
|
|
time.Sleep(d)
|
|
}
|
|
|
|
type Timer = time.Timer
|
|
|
|
func NewTimer(d Duration) *Timer {
|
|
return time.NewTimer(d)
|
|
}
|
|
|
|
func After(d Duration) <-chan Time {
|
|
return time.After(d)
|
|
}
|
|
|
|
func AfterFunc(d Duration, f func()) *Timer {
|
|
return time.AfterFunc(d, f)
|
|
}
|