The nsec library

#include "/package/prog/prjlibs/include/nsec.h"
  struct stat st;
  unsigned int nano;
  stat(&st, "path");

The nsec library provides functions for extracting the nanosecond fields from a stat structure. Currently, these functions return 500000000 nanoseconds (0.5 seconds) if the operating system does not provide nanosecond information, but this will probably be changed to 0 in a future version.

To link your program with the nsec library, add /package/prog/prjlibs/library/nsec.a to the end of the link command line.