This commit is contained in:
cdle
2023-06-20 13:04:16 +08:00
parent f18e8506fa
commit c40ca23954
7 changed files with 102 additions and 16 deletions
+5
View File
@@ -473,12 +473,17 @@ type TimeJsImpl struct {
Minute time.Duration
Hour time.Duration
Day time.Duration
Month int
}
func (t *TimeJsImpl) Now() time.Time {
return time.Now()
}
func (t *TimeJsImpl) Date(year int, month int, day int, hour int, min int, sec int, nsec int) time.Time {
return time.Date(year, time.Month(month), day, hour, min, sec, nsec, loc)
}
func (t *TimeJsImpl) Sleep(i int) {
time.Sleep(time.Duration(i) * time.Millisecond)
}