fork(1) download
  1. #include <stdio.h>
  2. #include <stdio.h>
  3. typedef perf_counter
  4. {
  5.  
  6. uint64_t tot, cnt, calls;
  7. perf_counter() : tot(0), cnt(0), calls(0) {};
  8. inline void reset() { tot = cnt = calls = 0; }
  9. inline void start() { cnt = sds_clock_counter(); calls++; };
  10. inline void stop() { tot += (sds_clock_counter() - cnt); };
  11. inline uint64_t avg_cpu_cycles() { return (tot / calls); };
  12. };
  13.  
  14. int main(void) {
  15. // your code goes here
  16. return 0;
  17. }
  18.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:4:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
 {
 ^
stdout
Standard output is empty