]> git.bitcoin.ninja Git - rust-lightning/commit
Use flexible timer types in background processor's regular jobs
authorMatt Corallo <git@bluematt.me>
Mon, 16 Jan 2023 23:47:11 +0000 (23:47 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 17 Jan 2023 00:03:35 +0000 (00:03 +0000)
commitd308710d4f820e14eea68f95926bf1795a7bc843
tree196151446acf7c6ffc5e14e804116397efacda37
parentce6bcf68a15331c082b34d09902241583bc6ff71
Use flexible timer types in background processor's regular jobs

`background-processor` does a number of jobs on various timers.
Currently, those are all done by checking the timers every 100ms
by interrogating `std::time::Instant`. This is fine for the
threaded version, but we'd like more flexibility in the `futures`-
based `background-processor`.

Here we swap the `std::time::Instant` interrogation for a lambda
which we will switch out to the user-provided sleeper in the next
commit.
lightning-background-processor/src/lib.rs