LCOV - code coverage report
Current view: top level - include/linux - timekeeping32.h (source / functions) Hit Total Coverage
Test: gcov_data_raspi2_real_modules_combined.info Lines: 2 8 25.0 %
Date: 2020-09-30 20:25:40 Functions: 0 0 -
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : #ifndef _LINUX_TIMEKEEPING32_H
       2                 :            : #define _LINUX_TIMEKEEPING32_H
       3                 :            : /*
       4                 :            :  * These interfaces are all based on the old timespec type
       5                 :            :  * and should get replaced with the timespec64 based versions
       6                 :            :  * over time so we can remove the file here.
       7                 :            :  */
       8                 :            : 
       9                 :            : static inline unsigned long get_seconds(void)
      10                 :            : {
      11                 :       3937 :         return ktime_get_real_seconds();
      12                 :            : }
      13                 :            : 
      14                 :            : static inline void getnstimeofday(struct timespec *ts)
      15                 :            : {
      16                 :            :         struct timespec64 ts64;
      17                 :            : 
      18                 :          0 :         ktime_get_real_ts64(&ts64);
      19                 :          0 :         *ts = timespec64_to_timespec(ts64);
      20                 :            : }
      21                 :            : 
      22                 :            : static inline void ktime_get_ts(struct timespec *ts)
      23                 :            : {
      24                 :            :         struct timespec64 ts64;
      25                 :            : 
      26                 :          0 :         ktime_get_ts64(&ts64);
      27                 :          0 :         *ts = timespec64_to_timespec(ts64);
      28                 :            : }
      29                 :            : 
      30                 :            : static inline void getrawmonotonic(struct timespec *ts)
      31                 :            : {
      32                 :            :         struct timespec64 ts64;
      33                 :            : 
      34                 :          0 :         ktime_get_raw_ts64(&ts64);
      35                 :          0 :         *ts = timespec64_to_timespec(ts64);
      36                 :            : }
      37                 :            : 
      38                 :            : static inline void getboottime(struct timespec *ts)
      39                 :            : {
      40                 :            :         struct timespec64 ts64;
      41                 :            : 
      42                 :       3937 :         getboottime64(&ts64);
      43                 :            :         *ts = timespec64_to_timespec(ts64);
      44                 :            : }
      45                 :            : 
      46                 :            : #endif

Generated by: LCOV version 1.14