mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Code Cleanup
- Used File object inside Sensor.
This commit is contained in:
parent
8543bd457b
commit
98f3e6e61d
1 changed files with 3 additions and 6 deletions
|
@ -26,7 +26,8 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include "Sensor.h"
|
||||
#include <File.h>
|
||||
#include <Sensor.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Sensor::Sensor ()
|
||||
|
@ -83,11 +84,7 @@ void Sensor::fileDeletion (const std::string&)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
time_t Sensor::getModification ()
|
||||
{
|
||||
struct stat s = {0};
|
||||
if (0 == stat (_file.c_str (), &s))
|
||||
return s.st_mtime;
|
||||
|
||||
return 0;
|
||||
return File (_file).mtime ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue