tenox7 / ttyplot

a realtime plotting utility for terminal/console with data input from stdin
Apache License 2.0
956 stars 42 forks source link

Update the clock on the full seconds (follow-up to #98, alternative to #144) #145

Closed edgar-bonet closed 7 months ago

edgar-bonet commented 7 months ago

This is an alternative to #144, based on the idea of “current iteration time”. Since iterations are non-blocking and very fast (typically sub-millisecond), we can assume time is constant within each iteration. The global variable now holding this time is a loop invariant.