#pragma once

#include <hilbert/kernel/application.hpp>

namespace hilbert::kernel::timer {

  void init_timer();

  //"mibiseconds" (1 second / 1024) since january 1st 2000
  extern uint64_t current_time;

  //when current_time >= sleeping_until, puts thread into paused threads
  void register_sleeping_thread(
    uint64_t sleeping_until, application::thread *thread);

  void on_timer_interrupt();

}
