<commit_before>/**
 * @file
 *
 * @date 02.09.2009
 * @author <NAME>
 */
#ifndef _TIMERS_H_
#define _TIMERS_H_

#include <kernel/irq.h>

#ifndef __ASSEMBLER__

typedef void (*TIMER_FUNC)(uint32_t id);

int timer_init(void);

/**
 * Set 'handle' timer with 'id' identity for executing every 'ticks' ms.
 */
int set_timer(uint32_t id, uint32_t ticks, TIMER_FUNC handle);

/**
 * Shut down timer with 'id' identity
 */
void close_timer(uint32_t id);

/**
 * Save timers context. Now saving only one context.
 */
int timers_context_save(void);

/**
 * Restore context by it number.
 */
int timers_context_restore(int context_number);

/**<commit_msg>the function is commented<commit_after>/**
 * @file
 *
 * @date 02.09.2009
 * @author <NAME>
 */
#ifndef _TIMERS_H_
#define _TIMERS_H_

#include <kernel/irq.h>

#ifndef __ASSEMBLER__

typedef void (*TIMER_FUNC)(uint32_t id);

/**
 * Initialization of the timers subsystem.
 */
int timer_init(void);

/**
 * Set 'handle' timer with 'id' identity for executing every 'ticks' ms.
 *
 * @param id timer identifier
 * @param ticks assignable time
 * @param handle the function to be executed
 *
 * @return whether the timer is set
 * @retval 1 if the timer is set
 * @retval 0 if the timer isn't set
 */
int set_timer(uint32_t id, uint32_t ticks, TIMER_FUNC handle);

/**
 * Shut down timer with 'id' identity
 *
 * @param id timer identifier
 */
void close_timer(uint32_t id);

/**
 * Save timers context. Now saving only one context.
 */
int timers_context_save(void);

/**
 * Restore context by it number.
 */
int timers_context_restore(int context_number);

/**
{'fraction_non_alphanumeric': 0.12640099626400997, 'fraction_numerical': 0.021170610211706103, 'mean_word_length': 3.9906832298136647, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '3596645', 'n_tokens_mistral': 593, 'n_tokens_neox': 553, 'n_words': 177}