Skip to content

Commit

Permalink
Better comment structure
Browse files Browse the repository at this point in the history
  • Loading branch information
seanchen1991 committed Apr 9, 2018
1 parent b36c7b1 commit a042491
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions ex6/ex6.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Write a program that will find the average time it takes for your computer
// to make a system call an empty write to stdout. Your program should use the
// `clock_gettime` procedure to time how long a single system call takes. It'll
// do this for one million iterations, and then find the average of all of those
// iterations in nanoseconds.
// For some helpful documentation and examples of using time-related system calls,
// visit this site: https://www.cs.rutgers.edu/~pxk/416/notes/c-tutorials/gettime.html
// While the linked site does say that `clock_gettime()` does not work on OSX, this
// turns out to only be the case for OSX versions < 10.12. Anything later than that
// and `clock_gettime()` should work just fine.
/*
Write a program that will find the average time it takes for your computer
to make a system call an empty write to stdout. Your program should use the
`clock_gettime` procedure to time how long a single system call takes. It'll
do this for one million iterations, and then find the average of all of those
iterations in nanoseconds.
For some helpful documentation and examples of using time-related system calls,
visit this site: https://www.cs.rutgers.edu/~pxk/416/notes/c-tutorials/gettime.html
While the linked site does say that `clock_gettime()` does not work on OSX, this
turns out to only be the case for OSX versions < 10.12. Anything later than that
and `clock_gettime()` should work just fine.
*/

#include <stdio.h>
#include <unistd.h>
Expand Down

0 comments on commit a042491

Please sign in to comment.