Inspired by the Linux utility program 'pv'