(t time.Time, field cronField, value int)
| 350 | } |
| 351 | |
| 352 | func addTime(t time.Time, field cronField, value int) time.Time { |
| 353 | switch field { |
| 354 | case cronFieldNanoSecond: |
| 355 | return t.Add(time.Duration(value) * time.Nanosecond) |
| 356 | case cronFieldSecond: |
| 357 | return t.Add(time.Duration(value) * time.Second) |
| 358 | case cronFieldMinute: |
| 359 | return t.Add(time.Duration(value) * time.Minute) |
| 360 | case cronFieldHour: |
| 361 | return t.Add(time.Duration(value) * time.Hour) |
| 362 | case cronFieldDayOfMonth: |
| 363 | return t.AddDate(0, 0, value) |
| 364 | case cronFieldMonth: |
| 365 | return t.AddDate(0, value, 0) |
| 366 | case cronFieldDayOfWeek: |
| 367 | return t.AddDate(0, 0, value) |
| 368 | } |
| 369 | |
| 370 | panic("unreachable code!") |
| 371 | } |
| 372 | |
| 373 | func setNextBit(bitsValue uint64, index int) int { |
| 374 | result := bitsValue & (mask << index) |
no outgoing calls
no test coverage detected