LCOV - code coverage report
Current view: top level - ports/unix - fatfs_port.c (source / functions) Hit Total Coverage
Test: unix_coverage_v1.24.0-148-g136058496.info Lines: 9 9 100.0 %
Date: 2024-12-20 19:05:39 Functions: 1 1 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : #include <time.h>
       2                 :            : #include "lib/oofatfs/ff.h"
       3                 :            : 
       4                 :        184 : DWORD get_fattime(void) {
       5                 :        184 :     time_t now = time(NULL);
       6                 :        184 :     struct tm *tm = localtime(&now);
       7                 :        184 :     return ((1900 + tm->tm_year - 1980) << 25)
       8                 :        184 :            | ((tm->tm_mon + 1) << 21)
       9                 :        184 :            | (tm->tm_mday << 16)
      10                 :        184 :            | (tm->tm_hour << 11)
      11                 :        184 :            | (tm->tm_min << 5)
      12                 :        184 :            | (tm->tm_sec / 2);
      13                 :            : }

Generated by: LCOV version 1.15-5-g462f71d