Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
timecompare Struct Reference

#include <timecompare.h>

Data Fields

struct timecountersource
 
ktime_t(* target )(void)
 
int num_samples
 
s64 offset
 
s64 skew
 
u64 last_update
 

Detailed Description

struct timecompare - stores state and configuration for the two clocks

Initialize to zero, then set source/target/num_samples.

Transformation between source time and target time is done with: target_time = source_time + offset + (source_time - last_update) * skew / TIMECOMPARE_SKEW_RESOLUTION

: used to get source time stamps via timecounter_read() : function returning target time (for example, ktime_get for monotonic time, or ktime_get_real for wall clock) : number of times that source time and target time are to be compared when determining their offset : (target time - source time) at the time of the last update : average (target time - source time) / delta source time * TIMECOMPARE_SKEW_RESOLUTION : last source time stamp when time offset was measured

Definition at line 73 of file timecompare.h.

Field Documentation

u64 last_update

Definition at line 80 of file timecompare.h.

int num_samples

Definition at line 76 of file timecompare.h.

Definition at line 78 of file timecompare.h.

s64 skew

Definition at line 79 of file timecompare.h.

Definition at line 74 of file timecompare.h.

ktime_t(* target)(void)

Definition at line 75 of file timecompare.h.


The documentation for this struct was generated from the following file: