1 Star 0 Fork 0

kzangv/gsf-fof

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
limit.go 316 Bytes
Copy Edit Raw Blame History
kzangv authored 2023-02-23 10:22 . fixed
package schedule
import (
"time"
)
type limit struct {
limit uint
sch Interface
}
func (s *limit) Next(t time.Time) *time.Time {
if s.limit > 0 {
s.limit--
return s.sch.Next(t)
}
return nil
}
func NewLimitSchedule(cnt uint, sch Interface) Interface {
return &limit{
limit: cnt,
sch: sch,
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/kzangv/gsf-fof.git
git@gitee.com:kzangv/gsf-fof.git
kzangv
gsf-fof
gsf-fof
v0.2.7

Search