Lines Matching refs:timestamp
25 ctx->timestamp.timestamp_support = ctx->config->timestamp.timestamp_support; in sensor_timestamp_dev_init()
26 if (ctx->timestamp.timestamp_support) { in sensor_timestamp_dev_init()
27 return sensor_set_timestamp_config(id, &ctx->config->timestamp); in sensor_timestamp_dev_init()
45 if (!ctx->timestamp.timestamp_support) { in sensor_set_timestamp_config()
49 ctx->timestamp.enabled = config->enabled; in sensor_set_timestamp_config()
50 ctx->timestamp.exponent = config->exponent; in sensor_set_timestamp_config()
68 if (!ctx->timestamp.timestamp_support) { in sensor_get_timestamp_config()
72 config->timestamp_support = ctx->timestamp.timestamp_support; in sensor_get_timestamp_config()
73 config->enabled = ctx->timestamp.enabled; in sensor_get_timestamp_config()
74 config->exponent = ctx->timestamp.exponent; in sensor_get_timestamp_config()
92 uint64_t timestamp; in sensor_get_timestamp() local
97 if (!ctx->timestamp.enabled) { in sensor_get_timestamp()
101 timestamp = FWK_NS(fwk_time_current()); in sensor_get_timestamp()
108 normalized_exponent = ctx->timestamp.exponent + 9; in sensor_get_timestamp()
110 return timestamp / pow_unsigned(10, normalized_exponent); in sensor_get_timestamp()
112 return timestamp / pow_unsigned(10, -normalized_exponent); in sensor_get_timestamp()