...
This commit is contained in:
parent
8cab5f881f
commit
28fbab3476
2 changed files with 8 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue