lib/scripts/showtime
author wenzelm
Mon, 01 Aug 2005 19:20:48 +0200
changeset 16994 a69d0496a724
parent 14981 e73f8140af78
permissions -rwxr-xr-x
determine Poly/ML's idea of current hardware and operating system type;

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