Skip to content

Instantly share code, notes, and snippets.

@iwadon
Created May 16, 2012 02:31
Show Gist options
  • Select an option

  • Save iwadon/2706819 to your computer and use it in GitHub Desktop.

Select an option

Save iwadon/2706819 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <sys/stat.h>
int main(int argc, char *argv[])
{
struct stat st;
if (stat(argv[0], &st) < 0) {
perror("stat()");
return 1;
}
printf("%ld %ld\n", st.st_mtimespec.tv_sec, st.st_mtimespec.tv_nsec);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment