language/core: support cycles_to_time and time_to_cycles outside of kernel