b3by / atom-clock

Place a clock or calendar in your status bar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Second numbers do not work [OS X]

CoWinkKeyDinkInc opened this issue · comments

I am using 1.15.0 on OS X 10.12.3 and I am using this code.

MMMM Do, dddd, h:mm:ss a

The seconds do not update until a minute has passed, so it always appears at 00, except the moment that you paste it in. It also doesn't work with milliseconds and such.

Make sure to set the clock interval to 0 guys. Sorry for not reading the settings fully.

It still doesn't work with fractional seconds.

Thank you for sharing this dude!
I'm not really sure fractional seconds would work in this case, as the smallest granularity I was considering takes only seconds into account.
The tick is calculated with a modulus operation, so that common refresh intervals (minute, second...) are always synced with the real time.
Do you explicitly need milliseconds accuracy?

I don't need milisecond accuracy, although I find a clock interval option kinda confusing.

That option is intended to specify how often the clock should refresh the time. Ideally, it can be set to 60 seconds (the default value) if I'm only displaying the minutes in the bar, or to one second if in the bar I also want to show the seconds. If you display the date only, you could set even a bigger timeout value. This saves Atom from useless clock refreshes.