deadinsi.de is part of the decentralized social network powered by Mastodon.

Administered by:

Server stats:

59
active users

Learn more

snowyfox

Programming, Java

pastebin.com/raw/e7TUD6b8
Schedule iteration is surprisingly convoluted. When you have a case like mine, where a loop is needed, and steps have different ending delays based on a condition, you need to break things up a bit more and add either to the complexity of the schedule spec or weird variables to control iteration.

When it's not trivial, it really is far better to just sleep manually or to do what I did in C3.

I won't bother with this in JavaScript then, I'll do one final exercise using promises, then stop for today.