lib/scripts/showtime
author berghofe
Fri, 31 Aug 2001 16:28:26 +0200
changeset 11533 0c0d2332e8f0
parent 10555 2323ec838401
child 14981 e73f8140af78
permissions -rwxr-xr-x
Added code generator setup.

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