mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 11:26:56 +08:00
Use Darwin stat functions when applicable.
This commit is contained in:
@@ -147,7 +147,11 @@ namespace alpr
|
|||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
return 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);
|
double milliseconds = (stat_buf.st_ctim.tv_sec * 1000) + (((double) stat_buf.st_ctim.tv_nsec) / 1000000.0);
|
||||||
|
#endif
|
||||||
|
|
||||||
return (long) milliseconds;
|
return (long) milliseconds;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user