#include <sys/time.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>



inline u_int64_t
gettime ()
{
  timeval tv;
  gettimeofday (&tv, NULL);
  return tv.tv_sec * (u_int64_t)(1000000) + tv.tv_usec;
}

void
main (int argc, char **argv)
{
  
  int fd =  open (argv[1], O_RDONLY, 0);

  u_int64_t starttime = gettime();

  for (int i = 0; i < 4015; i++) {
    fchown (fd, 13251, 100);
  }

  u_int64_t elapsed_usec = gettime() - starttime;

  printf (" usec: %qd\n", elapsed_usec);

}
