diff options
author | Benji Dial <benji@benjidial.net> | 2024-07-31 13:36:53 -0400 |
---|---|---|
committer | Benji Dial <benji@benjidial.net> | 2024-07-31 13:36:53 -0400 |
commit | b1cf9e5dfbc8967bd7cb2a22ec1e5e521f4e0e6e (patch) | |
tree | 00837891f9b9bf232e540a6f9b3e16f2438865c3 /euler/source/syscall.cpp | |
parent | 86b343f17175ef3e1fad2197636f75770466aa7c (diff) | |
download | hilbert-os-b1cf9e5dfbc8967bd7cb2a22ec1e5e521f4e0e6e.tar.gz |
add clock
Diffstat (limited to 'euler/source/syscall.cpp')
-rw-r--r-- | euler/source/syscall.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/euler/source/syscall.cpp b/euler/source/syscall.cpp index 0d30c4a..7637b10 100644 --- a/euler/source/syscall.cpp +++ b/euler/source/syscall.cpp @@ -407,4 +407,27 @@ namespace euler::syscall { } + void sleep(uint64_t mibiseconds) { + + uint64_t rax = 25; + uint64_t rdi = mibiseconds; + uint64_t rsi; + uint64_t rdx; + + __euler_do_syscall(rax, rdi, rsi, rdx); + + } + + uint64_t get_time() { + + uint64_t rax = 26; + uint64_t rdi; + uint64_t rsi; + uint64_t rdx; + + __euler_do_syscall(rax, rdi, rsi, rdx); + return rax; + + } + } |