summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2017-01-19 17:29:49 -0500
committerJune McEnroe <june@causal.agency>2017-01-19 17:29:49 -0500
commita3555612b6814bdfce0cbc6110891e61252d3980 (patch)
tree7725db0edea44a7f74290799c1f78b715a11eae6
parentAdd fuzzy clock (diff)
downloadsrc-a3555612b6814bdfce0cbc6110891e61252d3980.tar.gz
src-a3555612b6814bdfce0cbc6110891e61252d3980.zip
Show one digit of each hour in clock
Diffstat (limited to '')
-rwxr-xr-x.bin/clock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/.bin/clock.c b/.bin/clock.c
index 9eb4dc23..69d33dae 100755
--- a/.bin/clock.c
+++ b/.bin/clock.c
@@ -18,7 +18,7 @@ int main() {
         case 0: printf("...%02d...\n", clock->tm_hour); break;
         case 1: printf("..%02d....\n", clock->tm_hour); break;
         case 2: printf(".%02d.....\n", clock->tm_hour); break;
-        case 3: printf("%02d....%02d\n", clock->tm_hour, clock->tm_hour + 1); break;
+        case 3: printf("%d......%d\n", clock->tm_hour % 10, (clock->tm_hour + 1) / 10); break;
         case 4: printf(".....%02d.\n", clock->tm_hour + 1); break;
         case 5: printf("....%02d..\n", clock->tm_hour + 1); break;
         case 6: printf("...%02d...\n", clock->tm_hour + 1); break;