Skip to content

ShirleyNekoDev/BinaryClockMorph

Repository files navigation

BinaryClockMorph

Simple binary clocks (24-hour system, HH:mm:ss) for the Morphic Framework. Hours, minutes and seconds are each shown as 8 bit block in 2x4 columns.

As explained in https://en.wikipedia.org/wiki/Binary_clock, there are two common formats for binary-coded clocks: BCD and Sexagesimal.

Example output for a sexagesimal binary clock showing 10:12:30.

┌───────────────┐
│ ░ ▓  ░ ▓  ░ ▓ │
│ ░ ░  ░ ▓  ░ ▓ │
│ ░ ▓  ░ ░  ░ ▓ │
│ ░ ░  ░ ░  ▓ ░ │
└───────────────┘

Installation with Metacello

Metacello new
	repository: 'github://Salami555/BinaryClockMorph:master';
	baseline: 'BinaryClockMorph';
	get;
	load.

Usage

Both formats are implemented: BinarySexagesimalClockMorph and BinaryBCDClockMorph

BinaryBCDClock showing the time for 10:12:30 (0001 0000 : 0001 0010 : 0011 0000)

BinaryBCDClock showing the time for 10:12:30

BinarySexagesimalClock showing the time for 10:12:30 (00001010 : 00001100 : 00011110)

BinarySexagesimalClock showing the time for 10:12:30

Create yourself an instance of it via its ClockMorphClass newInHand

About

simple binary clock for Morphic (Squeak/Smalltalk)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published