lib/scripts/showtime
author wenzelm
Wed, 19 Oct 2005 21:52:45 +0200
changeset 17932 677f7bec354e
parent 14981 e73f8140af78
permissions -rwxr-xr-x
removed old-style theory format; tuned;

#!/usr/bin/env bash
#
# $Id$
# Author: Markus Wenzel, TU Muenchen
#
# showtime - print time.

TIME="$1"

SECS=$[ $TIME % 60 ]
[ $SECS -lt 10 ] && SECS="0$SECS"

MINUTES=$[ ($TIME / 60) % 60 ]
[ $MINUTES -lt 10 ] && MINUTES="0$MINUTES"

HOURS=$[ $TIME / 3600 ]

echo "${HOURS}:${MINUTES}:${SECS}"