this post was submitted on 18 Sep 2023
7 points (73.3% liked)
Rust Programming
8161 readers
21 users here now
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
lemmy uses clockwerk i believe, there's a few out there for rust.
Damn, that a really ingenious and intuitive use of the builder pattern.
Kudos to the devs!
what library is it from?
The clokwerk crate.
@SuddenlyBlowGreen @nothingness I recently needed that, but fuzzy. Like I want a task ran anywhere between 1PM and 2PM. Can this be accomplished with the clockwerk crate?
You could schedule a task at 1 PM, then generate a random number between 0-60 inside that task, wait that many minutes, then launch the actual task.