Skip to content

Commit

Permalink
fix updating
Browse files Browse the repository at this point in the history
  • Loading branch information
burdoto committed Feb 17, 2024
1 parent e04f5de commit c153a7f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions textUI/UiPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@ public abstract class UiPanel

public abstract IEnumerable<string> Print(int width, int height);

public Timer Run(long refreshInterval, Action? callback = null)
public Timer Run(int refreshInterval)
{
var task = new Timer(refreshInterval) { AutoReset = true };
task.Elapsed += (_, _) =>
{
callback?.Invoke();
Redraw();
};
task.Elapsed += (_,_) => Redraw();
task.Start();
return task;
}
Expand Down

0 comments on commit c153a7f

Please sign in to comment.