This is frustrating, I appreciate that there are workarounds, that you don't "need" a reset, but that logic applies too every arduino abstraction. It is not a satisfactory answer why there isn't a version specific resetMillis() or a setMillis(long t) function.
The point of arduino is to provide easier usage, and soo many cases where folks want to control the "system clock". You don't need RTC, you don't want to mess with version specific arduino innards, you want to keep it simple. If the answer is "you don't need it" then you don't need arduino either by the same reasoning. If folks are constantly asking about it, and there isn't a good reason why not, then why not?
Anyway, thanks, mostly good, just scratching my head on this one.
I don't think we want people playing with the innards of arduino, millis implementation has changed over the years, what is the point of NOT giving the user control over it? I am not hearing any new arguments, and the old ones just don't make sense. Is there a problem abstracting the set/reset to a built in function that does exactly that (and that gets updated if the inner workings of millis changes)? I don't understand why people have to justify it anymore than saying they want to reset the system clock.
Like I said, there is nothing you can do in arduino that you can't do in gcc (and then some). Saying you don't need it, well, that is irrelevant, it is good form to have it given how often it comes up. Comparing it to a wall clock is completely arbitrary, it is a timer, it is useful as such, what is it gonna hurt? Why is "protecting" the system clock from being set/reset so important to everyone?
Name any variable that can be shared among "processes" that can't be broken in such a way. I don't get why it is of special concern here. Most of the use cases I see are basic scripts in loop, keeping it simple, not relying on, or even caring much about, interrupts if that is what you mean about "processes". Or are you talking about some pre-emptive multi threading for arduino? And it is these sorts of users that we need to protect from themselves and that is why having setMillis doesn't make sense?
By processes, I mean really simple stuff, like two independent (but they're not, if you have your way) "blink without delay" going on.
One resets "millis", the other one isn't informed.
Is it really so hard to understand that there really is no good reason for what you're asking?
You've got the source - go ahead, implement it (It's in "wiring.c")
There is, you can write simpler code and do simple things. resetting at 49.7 days doesn't do anyone any good.
I think you are completely irrational, I have shown you good reason and you ignore it. If you were to say "shared libraries should not reset millis" I might agree with you, but none exist, speculation, there are countless request to reset millis, the workarounds are hackish and version dependent, how many good reasons do you need?
It is in demand, it probably belongs in feature requests.
I will repeat, slowly, using short words and sentences.
You have the source.
The source is in wiring.c.
You can modify the source to achieve what you so perversely want.
It may take you as long as five minutes to do.
When you have finished, you can post it in the Exhibition section.
But you enjoy wielding your powers of obstination, you should not be in your position.
I didn't volunteer for this job, and at the start, they told me there'd be time off for good behavior, but that didn't work, so I'm giving bad a go.
The goal of Arduino is to teach about programming and hardware.
Time will always move on, you can't reset time (you could reset some clock however).
If you do not understand, it isn't smart to consider everyone that doesn't agree with you to be wrong.
Let alone demanding some solution that you think you'd understand
If you want to teach programming, you need to tell the truth.
Sytem clocks can't be reset, that's a fact of life (they might overflow and you could do a hard reset, disturbing everything else).
A system clock moves forward, just like your own system clock (try resetting that one).
If you're being taught you can reset a system clock, how could anyone ever move on beyond Arduino ?
Accept this as a fact and learn how to live with it.
As jantje tried to explain, you could do that by creating a pseudo clock (like the clock on the wall, it's counting as fast and it can be reset, but it isn't your system clock).
Why would you want to create that and be the extra weight, if you do not absolutely need it ?
And by the way, you seem to get frustrated by this thread that was created by yourself.
Don't be frustrated towards people answering and trying to explain on this forum.
Those people aren't the ones you are addressing that frustration to, when telling them about "wielding powers of obstination", not even the moderators.
They are not the ones that are building or managing the IDE or Arduino at large.
Name any variable that can be shared among "processes" that can't be broken in such a way
I can't, which seems to me to be a reinforcement of the argument against resetting the system clock.
I can't imagine why you brought it up.
I forgot to mention, when you've implemented and exhibited your change and had it incorporated into the distro, I shall petition the admins that you be made a moderator, and then you can answer all the noob questions about why their timer code is broken.
the workarounds are hackish
Or, "simple arithmetic", as "hackish" is sometimes spelled.
AWOL:
I forgot to mention, when you've implemented and exhibited your change and had it incorporated into the distro, I shall petition the admins that you be made a moderator, and then you can answer all the noob questions about why their timer code is broken.