aboutsummaryrefslogtreecommitdiff
path: root/kernel/include/util/time.h
blob: fe3df180276e413ea5baf42c2e46a2f5387a9db8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include "types.h"
#include "util/debug.h"

extern uint64_t timer_tickcount;
extern uint64_t kernel_preempted_count;
extern uint64_t user_preempted_count;
extern uint64_t not_preempted_count;
extern uint64_t idle_count;
extern volatile uint64_t jiffies;

void time_init();

void time_spin(time_t ms);

void time_sleep(time_t ms);

long do_usleep(useconds_t usec);

time_t core_uptime();

time_t do_time();

size_t time_stats(char *buf, size_t len);