Skip to content

Commit

Permalink
compatibility with nim 1.6.10
Browse files Browse the repository at this point in the history
  • Loading branch information
inv2004 committed Mar 19, 2024
1 parent 5714783 commit 7e63ccd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/ttop/tui.nim
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ const HelpCol = fgGreen

type
Tui = ref object
sort = Cpu
scrollX = 0
scrollY = 0
filter = none(string)
threads = false
forceLive = false
draw = false
reload = false
quit = false
sort: SortField
scrollX: int
scrollY: int
filter: Option[string]
threads: bool
forceLive: bool
draw: bool
reload: bool
quit: bool
hist: int
blog: string
refresh: bool
Expand Down Expand Up @@ -492,7 +492,7 @@ iterator keyEachSec(): Key =
if k == Key.None:
timeout = 1000
else:
let b = (getMonoTime().ticks - a) div 1000000
let b = int((getMonoTime().ticks - a) div 1000000)
timeout = timeout - (b mod 1000)
yield k

Expand All @@ -506,7 +506,7 @@ proc tui*() =
if getCfg().light:
fgColor = fgLightColor

var tui = Tui()
var tui = Tui(sort: Cpu)
(tui.blog, tui.hist) = moveBlog(0, tui.blog, tui.hist, 0)
var live = newSeq[StatV2]()
var (info, stats) = hist(tui.hist, tui.blog, live, tui.forceLive)
Expand Down

0 comments on commit 7e63ccd

Please sign in to comment.