def ping_is_on_callback(ping_times):
    MolerTest.info('Ping works')
    if (ping_times['lost_connection_time'] > 0):
        if (ping_times['reconnection_time'] == 0):
            ping_times['reconnection_time'] = time.time()
            outage_time = (ping_times['reconnection_time'] - ping_times['lost_connection_time'])
            MolerTest.info('Network outage time is {}'.format(outage_time))
            if (outage_time > 3):
                MolerTest.error('Network outage duration exceeded threshold')
            else:
                MolerTest.info('Network outage duration is acceptable')
def ping_is_on_callback(ping_times):
    MolerTest.info('Ping works')
    if (ping_times['lost_connection_time'] > 0):
        if (ping_times['reconnection_time'] == 0):
            ping_times['reconnection_time'] = time.time()
            outage_time = (ping_times['reconnection_time'] - ping_times['lost_connection_time'])
            MolerTest.info('Network outage time is {}'.format(outage_time))
            if (outage_time > 3):
                MolerTest.error('Network outage duration exceeded threshold')
            else:
                MolerTest.info('Network outage duration is acceptable')