<commit_before>/*
 * Copyright (C) 2020 <NAME> <<EMAIL>>
 *
 * This file is subject to the terms and conditions of the GNU Lesser
 * General Public License v2.1. See the file LICENSE in the top level
 * directory for more details.
 */

/**
 * @ingroup     tests
 * @{
 *
 * @file
 * @brief       timer test application
 *
 * @author      <NAME> <<EMAIL>>
 *
 * @}
 */

#include <stdio.h>

#include "xtimer.h"

static void _callback(void *arg)
{
    (void)arg;
}

int main(void)
{
    xtimer_t t1 = { .callback=_callback };
    xtimer_t t2 = { .callback=_callback };

    /* ensure that xtimer_now64() is greater than UINT32_MAX
     * and the upper 32bit of xtimer_now64() equal 1 */
    _xtimer_current_time = (1LLU << 32U);
    xtimer_init();

    /* set to 100s (far in the future) */
    xtimer_set(&t1, 100000000LU);
    xtimer_set(&t2, 100000000LU);

    /* sleep 1 ms (uses a third xtimer internally).
     * shooting this timer did set all following short timer's to have a
     * long_start_time of 0.  The timer_callback main loop would correct the
     * timer_list_head, but not the following.<commit_msg>tests/xtimer_now32_overflow: fix active timers going out of scope<commit_after>/*
 * Copyright (C) 2020 <NAME> <<EMAIL>>
 *
 * This file is subject to the terms and conditions of the GNU Lesser
 * General Public License v2.1. See the file LICENSE in the top level
 * directory for more details.
 */

/**
 * @ingroup     tests
 * @{
 *
 * @file
 * @brief       timer test application
 *
 * @author      <NAME> <<EMAIL>>
 *
 * @}
 */

#include <stdio.h>

#include "xtimer.h"

static void _callback(void *arg)
{
    (void)arg;
}

static xtimer_t t1 = { .callback=_callback };
static xtimer_t t2 = { .callback=_callback };

int main(void)
{
    /* ensure that xtimer_now64() is greater than UINT32_MAX
     * and the upper 32bit of xtimer_now64() equal 1 */
    _xtimer_current_time = (1LLU << 32U);
    xtimer_init();

    /* set to 100s (far in the future) */
    xtimer_set(&t1, 100000000LU);
    xtimer_set(&t2, 100000000LU);

    /* sleep 1 ms (uses a third xtimer internally).
     * shooting this timer did set all following short timer's to have a
     * long_start_time of 0.  The timer_callback main loop would correct the
     * timer_list_head, but not the following.
{'fraction_non_alphanumeric': 0.112565445026178, 'fraction_numerical': 0.04013961605584642, 'mean_word_length': 3.0157618213660244, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4022091', 'n_tokens_mistral': 838, 'n_tokens_neox': 759, 'n_words': 262}