lib/scripts/showtime
author wenzelm
Tue, 13 Feb 2001 16:31:18 +0100
changeset 11109 ce1cefc6c14c
parent 10555 2323ec838401
child 14981 e73f8140af78
permissions -rwxr-xr-x
tuned;

#!/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}"