from datetime import datetime


def _calc_elapsed(start, fmt=True):
    """Returns hours, minutes, seconds; 
    formats to {H}h, {m} min., {s}s if fmt"""

    elapsed = datetime.now() - start
    hours, remainder = divmod(elapsed.total_seconds(), 3600) 
    minutes, seconds = divmod(remainder, 60)
    
    if fmt:
        return f"{hours}h, {minutes} min., {seconds}s"
    return hours, minutes, seconds