I don't exactly do that, but I'll often have multiple counters, and I treat time as something measured in frames. Millisecond time is used to check if 1/60th of a second (i.e. a frame) has passed. If it has, you execute a frame. If not, you don't.
Frames must always be executed in order. If you ever drop a frame, you can omit updating the screen, but you instead must focus on stepping/moving everything until you've caught up. Having a fixed frame time system, and guarantees that every frame will be executed simplifies a lot of logic. You can trigger events on the exact frame of a counter (i.e. ==), either a global counter, or one embedder into an animation system instance.
Anyway, that's my take on that: counters, and frames as the basic unit of game time measurement.
***
Programming things I wish I learned earlier: I don't hate PHP; I like JavaScript; Rust is kinda awesome. Making engines is fun, but a product released sooner is potentially way more valuable (if you're not doing anything cutting edge).
Other things I wished I learned earlier:
- Inflation is about 2% per year. If you're not earning more than that in interest, your money (savings) is eroding.
- With that in mind, doing something sooner is often cheaper than doing it later, thanks to inflation.
- THERE WERE SO MANY NO BRAINER INVESTMENTS OVER THE PAST 20 YEARS! It was totally worth investing in companies you trust.
- There's nuance to it, but there seems to be some shenanigans' with collateralized loans and investments.
- YOU DON'T HAVE TO DO ALL THE WORK! THAT INCLUDES CODE! YOU CAN HIRE PEOPLE!
"Work on your business, not in your business"
- YOU DON'T HAVE TO MAKE GAMES! IF YOU DON'T MAKE GAMES, YOU MIGHT HAVE CREATED A SUSTAINABLE BUSINESS IN LIKE, A YEAR. Then you require yourself to only work a few hours a week, and do WHATEVER THE HECK YOU WANT (including games) in the off time.