From b1cf9e5dfbc8967bd7cb2a22ec1e5e521f4e0e6e Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Wed, 31 Jul 2024 13:36:53 -0400 Subject: add clock --- euler/source/syscall.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'euler/source/syscall.cpp') 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; + + } + } -- cgit v1.2.3