factor/vm/run.cpp

27 lines
341 B
C++
Raw Normal View History

2009-05-02 05:04:19 -04:00
#include "master.hpp"
2009-05-04 02:46:13 -04:00
namespace factor
{
void factor_vm::primitive_exit()
2009-05-02 05:04:19 -04:00
{
exit(to_fixnum(dpop()));
}
void factor_vm::primitive_system_micros()
2009-05-02 05:04:19 -04:00
{
box_unsigned_8(system_micros());
2009-05-02 05:04:19 -04:00
}
void factor_vm::primitive_nano_count()
{
box_unsigned_8(nano_count());
}
void factor_vm::primitive_sleep()
2009-05-02 05:04:19 -04:00
{
2009-11-20 05:21:21 -05:00
sleep_nanos(to_unsigned_8(dpop()));
2009-05-02 05:04:19 -04:00
}
2009-05-04 02:46:13 -04:00
}