Skip to content

Add curtime logical gate#3486

Merged
Anticept merged 2 commits intowiremod:masterfrom
Gabriel-V-Maia:add-curtime-gate
Feb 13, 2026
Merged

Add curtime logical gate#3486
Anticept merged 2 commits intowiremod:masterfrom
Gabriel-V-Maia:add-curtime-gate

Conversation

@Gabriel-V-Maia
Copy link
Contributor

I think the PR's name is pretty self explanatory

The Curtime gate outputs CurTime() if CLK is different than zero, otherwise it just outputs the last saved number.

@thegrb93
Copy link
Contributor

thegrb93 commented Jan 2, 2026

Is there a use case that can't be resolved using a timer gate?

@Gabriel-V-Maia
Copy link
Contributor Author

Yes, such as timestamping moments, in one of my contraptions I had to use an e2 chip to output CurTime, the timer is more of a stopwatch then something that provides the uptime of a server.

There may have other ways to do such things without a CurTime gate, but I don't see harm on adding one, plus I saw another person looking for it on discord, so maybe it will help them on the future, and help other people looking for one too. (I suppose most people try other alternatives as they know from their experience that there isn't a CurTime gate, instead of asking if there's one or whatsoever)

@thegrb93
Copy link
Contributor

thegrb93 commented Jan 2, 2026

You can timestamp using a timer gate, which is essentially an offsetted curtime gate. I think it's not a good addition but it's not my call.

CurTime should at least be renamed to something that non-glua users can understand.

@Gabriel-V-Maia
Copy link
Contributor Author

Yeah I get what you mean now
I will rename the gate in a sec

@Gabriel-V-Maia
Copy link
Contributor Author

I had to fix the commit message, was thinking about the name and forgot to update it lol

@Anticept
Copy link
Member

Since this was already previously approved and the only thing you changed was a name and description, I'm approving and merging.

@Anticept Anticept merged commit 4605210 into wiremod:master Feb 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants