from datetime import datetime


def FormattedTime(DateTimeObject = None) -> str:
    """Returns a formatted time string."""
    if DateTimeObject == None:
        DateTimeObject = datetime.now()
    return DateTimeObject.strftime("%H:%M:%S")