Merge pull request #73 from twelve17/darwin

Use Darwin stat functions when applicable.
This commit is contained in:
Matthew Hill
2015-01-06 22:30:49 -05:00

View File

@@ -147,7 +147,11 @@ namespace alpr
if (rc != 0)
return 0;
#if defined(__APPLE__)
double milliseconds = (stat_buf.st_ctimespec.tv_sec * 1000) + (((double) stat_buf.st_ctimespec.tv_nsec) / 1000000.0);
#else
double milliseconds = (stat_buf.st_ctim.tv_sec * 1000) + (((double) stat_buf.st_ctim.tv_nsec) / 1000000.0);
#endif
return (long) milliseconds;
}