<commit_before>/*
 * Copyright (C) 2013 INRIA
 * Copyright (C) 2014 Freie Universität Berlin
 *
 * 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 Hwtimer test application
 *
 * @author      <NAME> <<EMAIL>>
 * @author      <NAME> <<EMAIL>mann@fu-berlin.de>
 *
 * @}
 */

#include <stdio.h>

#include "hwtimer.h"

#define BASE_DELAY (1000UL * 1000UL)
#define END_DELAY   (BASE_DELAY + ((HWTIMER_MAXTIMERS - 1) * DELTA_DELAY))
#define DELTA_DELAY (10UL * 1000UL)
#define MSGLEN 12 // == strlen("callback %2i")
char msg[MSGLEN * HWTIMER_MAXTIMERS]; // == [callback  1\0callback  2\0...]

void callback(void *ptr)
{
    puts((char *) ptr);
}

int main(void)
{
    puts("hwtimer test application...");

    puts("");
    puts("  Timers should print \"callback x\" once when they run out.");
    printf("  The order for x is 1, n-1, n-2, ..., 2 where n is the number of available hardware timers (%u on this platform).\n", HWTIMER_MAXTIMERS);
    puts("  In 1 second, one timer should fire every second/100 until all timers have run out.");
    puts("  Additionally the message \"hwtimer set.\" should be printed once 1 second from now.");<commit_msg>tests: some hwtimer cosmetics<commit_after>/*
 * Copyright (C) 2013 INRIA
 * Copyright (C) 2014 Freie Universität Berlin
 *
 * 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 Hwtimer test application
 *
 * @author      <NAME> <<EMAIL>>
 * @author      <NAME> <ludwig.ortmann@fu-berlin.de>
 *
 * @}
 */

#include <stdio.h>

#include "hwtimer.h"

#define BASE_DELAY  (1000UL * 1000UL)
#define END_DELAY   (BASE_DELAY + ((HWTIMER_MAXTIMERS - 1) * DELTA_DELAY))
#define DELTA_DELAY (10UL * 1000UL)
#define MSGLEN      (12) /* == strlen("callback %2i") */

char msg[MSGLEN * HWTIMER_MAXTIMERS]; /* == [callback  1\0callback  2\0...] */

void callback(void *ptr)
{
    puts((char *) ptr);
}

int main(void)
{
    puts("hwtimer test application...");

    puts("");
    puts("  Timers should print \"callback x\" once when they run out.");
    printf("  The order for x is 1, n-1, n-2, ..., 2 where n is the number of available hardware timers (%u on this platform).\n", HWTIMER_MAXTIMERS);
    puts("  In 1 second, one timer should fire every second/100 until all timers have run out.");
    puts("  Additionally the message \"hwtimer set.\" should be printed once 1 second from now.");
{'fraction_non_alphanumeric': 0.1412556053811659, 'fraction_numerical': 0.030642750373692077, 'mean_word_length': 3.3038585209003215, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, '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': '3787064', 'n_tokens_mistral': 956, 'n_tokens_neox': 900, 'n_words': 318}