Skip to content

Commit

Permalink
fix offset logic
Browse files Browse the repository at this point in the history
  • Loading branch information
hndada committed Nov 28, 2022
1 parent 26a68a9 commit 508afa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mode/timer.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewTimer(duration int64, offset *int64, tps int) Timer {
func (t *Timer) Ticker() {
t.Tick++
// Adjusting offset in real-time.
if td := t.Offset - *t.offset; td != 0 {
if td := *t.offset - t.Offset; td != 0 {
t.Offset += td
t.Tick += ToTick(td, t.TPS)
}
Expand Down

0 comments on commit 508afa4

Please sign in to comment.