summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/timers.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/timers.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/timers.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/timers.c b/drivers/gpu/nvgpu/common/linux/timers.c
index 41b55543..d1aa641f 100644
--- a/drivers/gpu/nvgpu/common/linux/timers.c
+++ b/drivers/gpu/nvgpu/common/linux/timers.c
@@ -243,6 +243,18 @@ s64 nvgpu_current_time_ms(void)
243} 243}
244 244
245/** 245/**
246 * nvgpu_current_time_ns - Time in nanoseconds from a monotonic clock.
247 *
248 * Return a clock in nanosecond units. The start time of the clock is
249 * unspecified; the time returned can be compared with older ones to measure
250 * durations. The source clock does not jump when the system clock is adjusted.
251 */
252s64 nvgpu_current_time_ns(void)
253{
254 return ktime_to_ns(ktime_get());
255}
256
257/**
246 * nvgpu_hr_timestamp - Opaque 'high resolution' time stamp. 258 * nvgpu_hr_timestamp - Opaque 'high resolution' time stamp.
247 * 259 *
248 * Return a "high resolution" time stamp. It does not really matter exactly what 260 * Return a "high resolution" time stamp. It does not really matter exactly what