I've seen some websites display the estimated time remaining for the current session/epoch. Is there a Rust call for this? Is there a sample of that code?
This entirely depends on the configuration of
First, this pallet itself does not enforce when sessions change. This is configured via
For each trait, look at the list of implementors to see what options you have.
For example, if
pallet-babe is used as the former, then latter becomes an estimate, because
babe uses a time-based session length, and if blocks are missed, then the session is essentially shortened in therms of block numbers.
PeriodicSession is used, the session length is fixed in terms of block numbers and the estimate you get is also constant.