def update_timer_interval(acq_state, seconds_per_sample):
    """
    A callback function to update the timer interval.  The timer interval is
    set to one day when idle.

    Args:
        acq_state (str): The application state of "idle", "configured",
            "running" or "error" - triggers the callback.
        seconds_per_sample (float): The user specified sample rate value in
            seconds per sample.

    Returns:
        float: Timer interval value in ms.
    """
    interval = 1000*60*60*24  # 1 day
    if acq_state == 'running':
        interval = seconds_per_sample * 1000  # Convert to ms
    return interval