+var _syscall = function(value) {
+ if (value == -1)
+ throw new Error(strerror(errno));
+};
+
+var info = *new (struct stat);
+if (false) {
+} else if ("st_atim" in info) {
+ var st_atime = "st_atim";
+ var st_mtime = "st_mtim";
+ var st_ctime = "st_ctim";
+} else if ("st_atimespec" in info) {
+ var st_atime = "st_atimespec";
+ var st_mtime = "st_mtimespec";
+ var st_ctime = "st_ctimespec";
+} else {
+ var st_atime = "st_atime";
+ var st_mtime = "st_mtime";
+ var st_ctime = "st_ctime";
+}
+
+var toDate = function(timespec) {
+ return new Date(timespec.tv_sec * 1000 + timespec.tv_nsec / 1000);
+};
+