This commit is contained in:
Kovid Goyal 2023-07-24 12:45:01 +05:30
parent 8cab5f881f
commit 28fbab3476
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 8 additions and 8 deletions

View file

@ -36,14 +36,6 @@ const (
PM
)
type timer struct {
interval time.Duration
deadline time.Time
repeats bool
id IdType
callback TimerCallback
}
type Loop struct {
controlling_term *tty.Term
terminal_options TerminalStateOptions

View file

@ -15,6 +15,14 @@ import (
var debugprintln = tty.DebugPrintln
type timer struct {
interval time.Duration
deadline time.Time
repeats bool
id IdType
callback TimerCallback
}
func (self *timer) update_deadline(now time.Time) {
self.deadline = now.Add(self.interval)
}