Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Initialise clock to number of seconds past the hour #4

Open
abradner opened this issue Dec 16, 2015 · 3 comments
Open

Request: Initialise clock to number of seconds past the hour #4

abradner opened this issue Dec 16, 2015 · 3 comments

Comments

@abradner
Copy link

I'm happy to write this and submit a PR, but I want to know if it's a) in scope and b) wanted before I write it.

Basically, the use case is having Clock's hour/quarter/five/minute methods tick at the same time (or close enough) to wall clock time, so properties that should update on the hour/minute/etc can just observe clock.method instead of doing some other tricky things

The easiest way I can see to do that is to set the initial value to be seconds past the hour or seconds past midnight.

Would this be valuable?

@jerel
Copy link
Owner

jerel commented Dec 19, 2015

I would be happy with this being added as long as it can be done without a) making it slow or b) making it much more complex. Setting the initial value to seconds as you suggest seems like it should work well

@makeitTim
Copy link

An update on this? Sounds like just what I was looking for as well.

@jerel
Copy link
Owner

jerel commented Apr 14, 2016

@makeitTim this addon has been refactored to a service since this issue was opened. You could likely now achieve what you want by calling stop() after init, setting the interval to whatever you want, and then calling start() at the time needed to kick it off

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

No branches or pull requests

3 participants