Created
August 30, 2017 02:32
-
-
Save enijkamp/9c2de809b1001e584f3e0274f2169a19 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
struct timespec start, end; | |
clock_gettime(CLOCK_MONOTONIC_RAW, &start); | |
yourKernelHere(); | |
clock_gettime(CLOCK_MONOTONIC_RAW, &end); | |
uint64_t delta_us = (end.tv_sec - start.tv_sec) * 1000000 + (end.tv_nsec - start.tv_nsec) / 1000; | |
mexPrintf("%d\n",elapsed); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment