• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlange-42 / arche-model / 4755768119

20 Apr 2023 02:58PM CUT coverage: 97.426% (+0.2%) from 97.222%
4755768119

push

github

GitHub
Clear systems to remove before potential panic, for better testability (#43)

10 of 10 new or added lines in 1 file covered. (100.0%)

530 of 544 relevant lines covered (97.43%)

107.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/model/util.go
1
package model
2

3
import "time"
4

5
// nextTime calculates the next intended update.
6
func nextTime(last time.Time, fps float64) time.Time {
49✔
7
        if fps <= 0 {
50✔
8
                return last
1✔
9
        }
1✔
10
        dt := time.Second / time.Duration(fps)
48✔
11
        now := time.Now()
48✔
12
        if now.After(last.Add(200 * time.Millisecond)) {
57✔
13
                return now.Add(-10 * time.Millisecond)
9✔
14
        }
9✔
15
        return last.Add(dt)
39✔
16
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc