8154996: [aix] Implement compare_file_modified_times for "8146879: Add option ..."
Reviewed-by: simonis
This commit is contained in:
parent
bbe16a058e
commit
187fe4afd1
@ -4875,3 +4875,16 @@ bool os::start_debugging(char *buf, int buflen) {
|
|||||||
}
|
}
|
||||||
return yes;
|
return yes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline time_t get_mtime(const char* filename) {
|
||||||
|
struct stat st;
|
||||||
|
int ret = os::stat(filename, &st);
|
||||||
|
assert(ret == 0, "failed to stat() file '%s': %s", filename, strerror(errno));
|
||||||
|
return st.st_mtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
int os::compare_file_modified_times(const char* file1, const char* file2) {
|
||||||
|
time_t t1 = get_mtime(file1);
|
||||||
|
time_t t2 = get_mtime(file2);
|
||||||
|
return t1 - t2;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user