From 2c4eead0c2c55c390371033e143722cdb6a16785 Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 23 Aug 2020 23:33:42 -0400 Subject: [PATCH] yield: print the running yield --- src/demo/yield.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/demo/yield.c b/src/demo/yield.c index 471f28fa6..7bd144e34 100644 --- a/src/demo/yield.c +++ b/src/demo/yield.c @@ -72,6 +72,11 @@ int yield_demo(struct notcurses* nc){ ncvisual_destroy(wmv); return -1; } + ncplane_set_bg_rgb(std, 0x10, 0x10, 0x10); + ncplane_set_fg_rgb(std, 0xf0, 0x20, 0x20); + ncplane_set_attr(std, NCSTYLE_BOLD); + ncplane_printf_aligned(std, 3, NCALIGN_CENTER, "Yield: %3.1f%%", ((double)tfilled * 100) / threshold_painted); + ncplane_set_attr(std, NCSTYLE_NONE); DEMO_RENDER(nc); demo_nanosleep(nc, &scaled); ++iters;