Created
January 29, 2018 17:58
-
-
Save trnila/c4cf29c3155facbd249cb8f75321086b to your computer and use it in GitHub Desktop.
mbed profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void test() { | |
int tests = 1000; | |
Timer timer; | |
timer.reset(); | |
timer.start(); | |
int begin = timer.read_us(); | |
wait(1); | |
int spent = timer.read_us() - begin; | |
pc.printf("took %dus\r\n", spent / tests); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment