WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit 77ba66f3 authored by Javad Ebrahimian Amiri's avatar Javad Ebrahimian Amiri
Browse files

timer (simple periodic task) works now

parent 976f861a
......@@ -22,5 +22,11 @@ pub fn sys_get_time_ns() -> i64 {
);
}
(timestamp.tv_nsec as i64) + (1_000_000_000 * (timestamp.tv_sec as i64))
let res = (timestamp.tv_nsec as i64) + (1_000_000_000 * (timestamp.tv_sec as i64));
if cfg!(debug_assertions) {
debug!("sys_get_time_ns: {}", res);
}
res
}
#!/usr/bin/env bash
export MU_ZEBU=$PWD/../../../mu-impl-fast/
export ZEBU_BUILD=release
export ZEBU_BUILD=debug
export DYLD_LIBRARY_PATH=$PWD
export LD_LIBRARY_PATH=$MU_ZEBU/target/$ZEBU_BUILD/deps/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$PWD/emit/:$LD_LIBRARY_PATH
......
......@@ -257,10 +257,9 @@ logger = AnsiLogger('rt_rpython_tests')
# assert False
@may_spawn_proc
def test_get_time():
def test_simple_timer():
from rpython.dev.dev_timer import test_simple_timer
logger.info('going to build the test function')
# exec_path = executable_from_rpy_func(test_gettime, [rffi.SIGNED, rffi.SIGNED], rffi.SIGNED)
exec_path = executable_from_rpy_func(test_simple_timer, [], rffi.SIGNED)
logger.info('going to run the test function')
......@@ -270,14 +269,19 @@ def test_get_time():
# subprocess.check_output([fn()])
import subprocess
import os
start = time.time()
res = subprocess.call('sudo LD_LIBRARY_PATH=$PWD/emit %s' % exec_path, shell=True)
res = subprocess.call(
'sudo LD_LIBRARY_PATH=$PWD/emit:$LD_LIBRARY_PATH MU_LOG_LEVEL=debug %s' % exec_path, shell=True)
end = time.time()
logger.info("Test took: ")
logger.info(end-start)
logger.info('returned result: %s' % res)
logger.info('returned res = %d' % res)
assert False
# assert False
assert 0 <= res <= 50
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment