I think what he is saying is that...
You have the right idea.
I believe I was wrong in my assessment. I think the code is actually unstable. If "trigger = millis();" results in a non-zero value assigned to trigger, I believe the application gets stuck in the
while loop until
trigger wraps around. I think the end result is that
second is set to zero,
minute jumps ahead by one, and
trigger is left at "random" value lower than "millis() - adjustment".
But the details are irrelevant given the fact that
aTime /
adjustment serve no useful purpose and can be easily eliminated thus eliminating any possibility of a problem.