mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Verify source file modification time against capture time.
This commit is contained in:
@@ -12,6 +12,16 @@ static inline bool FileExists( const char* fn )
|
||||
return stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0;
|
||||
}
|
||||
|
||||
static inline bool SourceFileValid( const char* fn, uint64_t olderThan )
|
||||
{
|
||||
struct stat buf;
|
||||
if( stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0 )
|
||||
{
|
||||
return buf.st_mtime < olderThan;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user