This is somewhat similar idea of what I'm doing
I have an enum with a bunch of actions we do irl (toilet, smoking, grab drink, check website, get lost in a read, ...)
They have an frequenty rate as well as a min-max duration.
Also got this for pseudo's.
Then based on that I pass the duration as return for the onloop.