Feature: Simulation Time
Opened this issue · 1 comments
carlaKC commented
Some use cases may want to use simulation time rather than seconds. Steps to complete:
- Abstract time usage to trait (implemented by system time)
- Add implementation time trait implementation (this possibly exists already - do some googling)
- Update user config to be able to opt into sim time (high level parameter / config
interval_secs
-> more genericinterval
?)
carlaKC commented
As a first step for this, we can pull out the time based functionality in sim-ln into a Clock
trait.
There's some debate as to whether simulation time will work with real nodes, because we can only go as fast as the underlying node can process payments. That said, with the addition of #165 we'd be interested in simulation time (as the simulated nodes are incredibly cheap to run) so I'd like to start down this path.
This will probably need some forward thinking as to what simulated time we're going to use to minimize refactoring. I took a brief look at game_time which looked promising but haven't done a deep dive.