Guest User

Untitled

a guest
May 11th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. template<long count> __attribute__((always_inline)) inline void nop(){
  2. nop<positiveElseZero(count - 1)>();
  3. __asm__ __volatile__("nop\n\t");
  4. }
  5.  
  6. template<> __attribute__((always_inline)) inline void nop<0>(){
  7. //nothing so the template recursion ends
  8. }
  9.  
  10. void main() {
  11. nop<2000>();
  12. }
Advertisement
Add Comment
Please, Sign In to add comment