Tag Archives: clock

binary-clock: Welcome to the geek club

I’ve been spending a lot of time in some core Linux packages lately, and I would do well to step outside those for a short while. Here’s one or two that are newer than BSD4.25.013a. … πŸ™„

Most of the geeks I know personally — the ones who venture out of their dens willingly, to make contact with the outside world — are for some reason fascinated by binary clocks.

I think it’s an intellectual superiority thing, where the ability to recognize and appreciate a binary clock is a clue to another geek. From there they can have discussions at a level deeper than fried foods, pictures of offspring and American-style football.

Instead, they can jump to more esoteric topics, such as the incongruencies between particular variations on the Star Trek universe. Or why a light saber is still superior to a portal gun. πŸ˜•

So an office clock that counts out in binary via flickering blue LEDs or a screensaver that keeps time by flashing colored boxes is a subtle-yet-pointed invitation to commiserate at geek level. Kind of like a club tie, or a special handshake.

In the absence of the US$25 that will get you an actual, physical binary clock, there are quite a few options for the terminal. One is John Anthony’s binary-clock, which makes good on its name.


It is exactly what it promises: No numbers, just flickering digits counting out hours, minutes and seconds, from top to bottom.

And binary-clock (which installs as binclock, just so you know) gives you no crutches to lean on. Some other binary clocks might make concessions to those who don’t get the old joke about 10 types of people, and show conventional numbering at the same time. With binary-clock you either read the display, or you’re late for your bus.

Two frills worth mention: themes and color sets. Pressing “t” will cycle through character sets for the display — all of which, I would like to mention, are base ASCII sets. So no complaints about oddball output at the framebuffer this time.

Pressing “c” will cycle through color schemes, changing the indicator colors to follow preset styles. You can’t actually adjust the colors (or display characters) directly. Unless you edit the code, of course.

Which is probably a possibility, if binary-clock is something that appeals to you. After all, if you see binary-clock and think, “Heck yeah, I’m putting that on the 300Mhz CTX EzBook 800 running Crux Linux in my office” … well, hand-editing code is probably a no-brainer for you.

Congratulations, and welcome to the geek club. 😈

P.S.: Post 1024. :mrgreen:

tty-clock: Taken for granted, for far too long

I casually mentioned tty-clock the other day while traipsing through ncurses-examples, then thought for a half a second and worried that I had never included it here.

A few panicked searches later and my fears were confirmed: Out of all the thousands (and yes, it has been thousands) of programs I’ve looked over in the past 20 months, I never gave proper attention to tty-clock.

That’s something we shall have to remedy.


I can’t think of a system I’ve built in the past five years that hasn’t included tty-clock. I’ve even patched it myself, a long time ago, before it was possible to feed a date format into the display.

tty-clock is usually what I hold up to other console clocks, and see how the fare. If a text-only clock can pass muster with tty-clock, it’s doing pretty well.

You can poke around with it on your own time, but know that it can handle multiple colors now, as well as bold effects, flashing time separators, seconds display, rebounding through the terminal window, 24-hour and/or UTC time, and refresh rates down to the nanosecond. It has evolved quite nicely.

Whether or not you prefer a text-based lifestyle and whether or not your computer can handle the burden of a fully graphical desktop environment, you really owe it to yourself to at least try tty-clock once. My apologies for omitting it for so, so long. 😳

fluxcapacitor: Now you have time for everything

I have a program here that I don’t quite know how to explain, even though it’s fairly obvious that it’s working. The aptly named fluxcapacitor allows programs to run without timing constraints … which is how I would explain it.

Maybe this will help. I’ll borrow from the home page example, because it makes the most sense to me:

kmandla@6m47421: ~/downloads/fluxcapacitor$ time sleep 12

real	0m12.003s
user	0m0.000s
sys	0m0.000s

That much is obvious. But then there’s this:

kmandla@6m47421: ~/downloads/fluxcapacitor$ time ./fluxcapacitor -- sleep 12

real	0m0.018s
user	0m0.007s
sys	0m0.003s

Quite obviously, what we have here is a way to negate time. Well, this changes everything. Download files in fractions of seconds. Compile software in minutes instead of days. Turn your 486 into an i7. Search for aliens. Fold proteins. Cure cancer and the common cold. Achieve world peace. We certainly have time for it now. πŸ˜€

Well, maybe not. πŸ™„ I can see where fluxcapacitor would be helpful in some situations, like troubleshooting software that imposed delays on you, or maybe some network testing problems.

But to be honest, I think most of my personal applications wouldn’t be too far improved by fluxcapacitor. I’ve read the author’s examples and I think they make sense, I just can’t think of anything I do on a day-to-day basis that would benefit from it. :\

I shall keep fluxcapacitor in the back of my mind, and save it for emergencies. Like when I am late to work in the mornings. πŸ˜‰

vtclock: Yes, one more console clock can’t hurt

It’s funny to think that almost four years ago to the day, I posted a note on the old blog about vtclock. And here we are again.


And not much has changed. It still works, much in the same way as it always has. As far as I can tell, there haven’t been any updates, but it’s not like it had many fatal flaws to start with.

And it still carries some of its coolest features, like the ability to pipe a line from another program into its output. So you can put date in there, or uname, or perhaps a load meter. Get crazy, I dare you.

Color is still a weak point. And I notice now that selecting a particular display character seems to interfere with the actual second-by-second animation. I don’t recall if that was a problem years ago.

Who knows, perhaps in another four years we’ll take a look at it again, and discover it has changed. But I think not. πŸ˜‰

leave: Repeat after me, simple is best

It appears by the man page that leave is an immigrant from BSD, and by all accounts it’s a worthy addition to the population of Linux software.

leave does somethings simple but important — takes a time as an argument, and throws out an alarm as you get closer and closer to it.


There’s almost nothing to leave, and aside from that one time flag, it doesn’t accept much as an argument.

It seems to do its job rather well, and I’ve even tried starting more than one leave reminder, and they don’t seem to conflict.

So perhaps it’s possible to run more than one at a time and not confuse it.

A few shortcomings … it can only track times within the last 12 hours. Yes, I know, that’s inconvenient for those of us with daylong usage habits.

And it does not allow customizing the alarm message, which seems like a no-brainer for the program designer. I would much rather have it scream “ACHTUNG!” in all capital letters than just say, “Time to leave!”

More flexible that way. πŸ˜‰

It seems to be rather aged though, so perhaps it’s not appealing for someone to pick through the guts of this to get it working in a different fashion.

Final note: I only find leave in Debian, and I don’t know enough about the BSD landscape to be able to find it outside of packages.debian.org. If you’re familiar with BSD and kind find a home page for leave, please send it along. Cheers! πŸ™‚

hwclock: Keeping time with you

I wasn’t going to include hwclock because I assumed there wasn’t much here to explain or show. That’s partly true.


But hwclock has, in the past, been a crucial tool for keeping out-of-date machines on time, literally.

These days that’s not so much a problem for me; my oldest machine is a single core beast, but it still has more than enough oomph to avoid clock slippage.

Such was not always the case, particularly as hardware drifts back over the past 10 or 15 years. I’ve had machines with weak CMOS batteries that needed regular updating, or machines that would lose their bead on time if the workload got too heavy.

In those cases, a combination of ntpdate and hwclock usually did the trick (yes, I know ntpdate is technically deprecated).

And to be honest, I still use those two from time to time, to correct time to time (puns intended). ntpdate syncs, hwclock with the -w flag writes it out to the hardware.

There’s more that hwclock can do and if you build systems from almost nothing, it becomes important that you know how to use it. As it is though, I’ve already said too much about very little, and I know your time is valuable. πŸ˜‰

One last toy before the H section is finished. Amazing. … 😯

P.S., hwclock is in util-linux, depending on your distro.

binclock: Just a piece of something bigger

If there is one thing I have learned in the few years I have worked with Linux, it’s that the sum is greater than the parts.

What you can do with some leftover parts will surprise you. What you can do with a few conjoined bits of software will delight you.

On its own, binclock won’t dazzle you. Probably.


On the other hand, there’s quite a bit of potential there. By itself it can do a few small things. And it has color.

But cram it through toilet and it becomes … fabulous!


See? I told you. :mrgreen:

P.S.: The author of binclock is also the author of yacpi. Remember that?
P.P.S.: More stuff you can do with binclock.

tbclock: Probably the best binary clock

You can take your pick of clock programs for the console; I’ve mentioned a few in past weeks that weren’t bad.

Narrow the field a little and focus on binary clocks, and tbclock is probably your best one.


Lots of options for display, colors, arrangement, hints, a stopwatch and even a simple guessing game for fun.

I like tbclock because it does everything you expect, adds a few frills to entice, and stops before it becomes something different.

A gold smilie for tbclock: πŸ˜€