LTP GCOV extension - code coverage report
Current view: | directory - ept/core - apt.cpp
Test: | lcov.info
Date: | 2008-08-14 |  | Instrumented lines: | 7
Code covered: | 100.0 % |  | Executed lines: | 7

           1                 : // -*- C++ -*-
           2                 : #include <ept/core/apt.h>
           3                 : #include <wibble/sys/fs.h>
           4                 :
           5                 : namespace wfs = wibble::sys::fs;
           6                 :
           7                 : namespace ept {
           8                 : namespace core {
           9              45 : time_t aptTimestamp()
          10                 : {
          11                 :     std::auto_ptr<struct stat> st = wfs::stat(
          12              45 :         _config->FindFile( "Dir::Cache::pkgcache" ) );
          13              45 :     time_t t1 = st.get() == NULL ? 0 : st->st_mtime;
          14                 :
          15                 :     std::auto_ptr<struct stat> st1 = wfs::stat(
          16              45 :         _config->FindFile( "Dir::State::status" ) );
          17              45 :     time_t t2 = st1.get() == NULL ? 0 : st1->st_mtime;
          18                 :
          19              45 :     return t1 > t2 ? t1 : t2;
          20                 : }
          21                 :
          22                 : }
          23               6 : }

Generated by: LTP GCOV extension version 1.6