Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Changed second_to_work to seconds_to_work in NCCE.

...

Code Block
bgColor#FFCCCC
int do_work(int seconds_to_work) {
  time_t start = time(0);

  if (start == (time_t)(-1)) {
    /* Handle error */
  }
  while (time() < start + secondseconds_to_work) {
    do_some_work();
  }
}

...