[demo] FPS not FPSS (thought i already made this change)?

This commit is contained in:
nick black 2021-10-21 21:36:41 -04:00
parent 85b6d55577
commit 1bdeb0d258
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -29,8 +29,6 @@ static int plot_grab_y = -1;
// position of the plot *when grab started*
static int plot_pos_y;
#define FPSHZ 2
#define FPSGRAPH_MAX_COLS 72 // give it some room on each side of an 80-column term
// how many columns for runtime?
@ -587,7 +585,7 @@ int demo_render(struct notcurses* nc){
if(!plot_hidden){
ncplane_move_family_top(ncuplot_plane(plot));
}
uint64_t ns = (timespec_to_ns(&ts) - plottimestart) / (NANOSECS_IN_SEC / FPSHZ);
uint64_t ns = (timespec_to_ns(&ts) - plottimestart) / NANOSECS_IN_SEC;
ncuplot_add_sample(plot, ns, 1);
}
if(menu){
@ -666,7 +664,7 @@ int fpsgraph_init(struct notcurses* nc){
NCPLOT_OPTION_PRINTSAMPLE;
opts.gridtype = NCBLIT_BRAILLE;
opts.legendstyle = NCSTYLE_ITALIC | NCSTYLE_BOLD;
opts.title = "frames per semisecond";
opts.title = "frames per second";
ncchannels_set_fg_rgb8(&opts.minchannels, 0x80, 0x80, 0xff);
ncchannels_set_bg_rgb(&opts.minchannels, 0x201020);
ncchannels_set_bg_alpha(&opts.minchannels, NCALPHA_BLEND);