def log_with_time(result, reactor, log, start, msg, time_kwarg=None):
    """
    Log `msg` with time taken

    :param result: result of deferred callback
    :param reactor: `IReactorTime` provider
    :param log: A bound logger
    :param start: start seconds
    :param msg: Message to display with time taken
    :param time_kwarg: kwarg used to call msg with time taken
    """
    time_taken = reactor.seconds() - start
    msg = '{msg} in {t} seconds'.format(msg=msg, t=time_taken)
    if time_kwarg:
        log.msg(msg, **{time_kwarg: time_taken})
    else:
        log.msg(msg)
    return result