Welcome to mirror list, hosted at ThFree Co, Russian Federation.

TracyFilesystem.cpp « server - github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aa07d67bc651b590684bdbab8917927c41c8514a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "TracyFilesystem.hpp"
#include "TracyView.hpp"

namespace tracy
{

bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view, const Worker& worker )
{
    if( worker.GetSourceFileFromCache( fn ).data != nullptr ) return true;
    struct stat buf;
    if( stat( view.SourceSubstitution( fn ), &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0 )
    {
        return (uint64_t)buf.st_mtime < olderThan;
    }
    return false;
}

}