aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Moon Flower <mforoud86@gmail.com> 2026-02-14 15:55:59 +0330
committerGravatar Moon Flower <mforoud86@gmail.com> 2026-02-14 15:55:59 +0330
commitdf43501d9d6b2074e9396c6ebcf53572391c9e58 (patch)
tree4a2be50da91e3b3b5492bcab9949b916339ed643
parentfirst commit. (diff)
readme+makefile+staticexeHEADmoon
-rw-r--r--Makefile6
-rw-r--r--README.md16
-rwxr-xr-xstopwatchbin0 -> 18744 bytes
3 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7625e5b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,6 @@
+all:
+ rm -f stopwatch
+ clang stopwatch.c -o stopwatch -Oz -static -flto -ffreestanding -ffunction-sections -fdata-sections -Wl,--gc-sections
+ strip --strip-all stopwatch
+ @echo "-- IF YOU DO NOT HAVE UPX, THE BUILD WILL FAIL! IF YOU DO NOT NEED THE EXTRA JUICE SQUEEZE, THIS IS FINE."
+ upx --best --ultra-brute stopwatch
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..3d3117f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,16 @@
+# stopwatch
+simple, fast, non-cpu-intensive high-accuracy stopwatch for the terminal.
+
+this program is designed for machines running a unix system interface via terminal/tty. i have done mostly all i could think of to reduce its program size, speed and accuracy, whilst making sure it sleeps for 999us inbetween iterations as to not pressure the cpu core that it runs on.
+
+a static build of the executable is provided alongside the code.
+
+# instructions
+instructions are included in the code.
+
+```
+space => start / pause / resume
+ctrl+c / ctrl+d / eof => exit
+```
+
+this only works on unix.
diff --git a/stopwatch b/stopwatch
new file mode 100755
index 0000000..817f55f
--- /dev/null
+++ b/stopwatch
Binary files differ