def getunit(secs, size):
    """given a number of seconds, and a number of seconds in a larger unit of
    time, calculate how many of the larger unit there are and return both
    that and a remainder value"""
    bigunit = secs // size 
    if bigunit:
        secs %= size
    return (bigunit, secs)