def walltime(time):
    """Return a qsub-style walltime string for the given time (in hours)."""
    hours = int(time)
    time -= hours
    minutes = int(time * 60)
    time -= minutes / 60
    seconds = int(time * 3600)
    return ":".join(map(str, (hours, minutes, seconds)))