factor out framerate info from examples #11
Labels
enhancement
hacktoberfest
good issue to start contributing, or contribute only one or two
help wanted
I'm not entirely sure if it should go into SDL2::Raw at all, but it'd surely be better to have a little module than to have it spread out over all the examples.
Currently in the "main loop" of the examples there's a native num array where frame times (taken using
nqp::time_n
, though surely a higher-level function ought to be okay, too, nowadays) are pushed, then at the end they are sorted and a few percentiles are printed out. However, if there's not enough values, sometimes it'll output Any or Nil or so.It'd be nice to analyze it more thoroughly, like giving information about framerate stability (for example, how often do GC pauses increase frame times?)
The text was updated successfully, but these errors were encountered: