firmware/mockturtle-rt: check if mqueue is full before claiming, add RISC-V time measurement functions