def taken(diff):
    """Convert a time diff to total number of microseconds"""
    microseconds = diff.seconds * 1_000 + diff.microseconds
    return abs(diff.days * 24 * 60 * 60 * 1_000 + microseconds)