lib/scripts/showtime
author paulson
Thu, 20 Mar 2003 15:58:25 +0100
changeset 13871 26e5f5e624f6
parent 10555 2323ec838401
child 14981 e73f8140af78
permissions -rwxr-xr-x
Gauss's law of quadratic reciprocity by Avigad, Gray and Kramer

#!/usr/bin/env bash
#
# $Id$
# Author: Markus Wenzel, TU Muenchen
# License: GPL (GNU GENERAL PUBLIC LICENSE)
#
# 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}"