LingaoM opened a new pull request, #18801:
URL: https://github.com/apache/nuttx/pull/18801

   Add CONFIG_SIM_WALLTIME_RATIO Kconfig option and --sim-rt-ratio= 
command-line argument to control the ratio of simulated time to real time. A 
ratio greater than 1.0 speeds up simulated time while a value less than 1.0 
slows it down. The default ratio of 1.0 preserves the existing real-time 
behavior.
   
   The implementation applies the ratio in host_gettime(), host_sleepuntil() 
and host_settimer() so both SIM_WALLTIME_SLEEP and SIM_WALLTIME_SIGNAL  modes 
are supported.
   
     Tested on sim:nsh with the following sleep test:
   
       $ echo -e "sleep 2\nexit" | time ./nuttx
       real    0m2.0xxs
   
       $ echo -e "sleep 2\nexit" | time ./nuttx --sim-rt-ratio=2.0
       real    0m1.0xxs
   
       $ echo -e "sleep 2\nexit" | time ./nuttx --sim-rt-ratio=0.5
       real    0m4.0xxs
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to