StratifyLabs / sostest

Stratify OS Test Suite
GNU Lesser General Public License v3.0
3 stars 3 forks source link

Api chrono test #45

Closed shomagan closed 6 years ago

shomagan commented 6 years ago

add test for MicroTime

shomagan commented 6 years ago

1.a little strange behavior in stress test for MicroTimer, sometimes wait more then value. Add delta time, in order to see difference 2MicroTime test sec repeated multiplication in function "from_sec" static MicroTime from_seconds(u32 sec){ return MicroTime(sec1000000UL); } static MicroTime from_sec(u32 sec){ return from_seconds(# 1000000ULsec); }

shomagan commented 6 years ago

MicroTimer stress test: If wait time more then 500 usec works correctly (delay_time_usec)

tyler-gilbert commented 6 years ago

@shomagan I made a few changes to the chrono API. Mainly, I changed the name of MicroTimer to Timer.

Can you pull the latest from the StratifyAPI and make the changes?

Also, you don't need to test deprecated methods. Timer::wait_usec() is exactly the same as Timer::wait_microseconds(). Just test Timer::wait_microseconds(). That applies to all the usec, msec, sec code. Use the microseconds, milliseconds, and seconds versions.