diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/timers.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/timers.c | 12 |
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 efd04557..140ae80e 100644 --- a/drivers/gpu/nvgpu/common/linux/timers.c +++ b/drivers/gpu/nvgpu/common/linux/timers.c | |||
@@ -229,3 +229,15 @@ void nvgpu_msleep(unsigned int msecs) | |||
229 | { | 229 | { |
230 | msleep(msecs); | 230 | msleep(msecs); |
231 | } | 231 | } |
232 | |||
233 | /** | ||
234 | * nvgpu_current_time_ms - Time in milliseconds from a monotonic clock. | ||
235 | * | ||
236 | * Return a clock in millisecond units. The start time of the clock is | ||
237 | * unspecified; the time returned can be compared with older ones to measure | ||
238 | * durations. The source clock does not jump when the system clock is adjusted. | ||
239 | */ | ||
240 | s64 nvgpu_current_time_ms(void) | ||
241 | { | ||
242 | return ktime_to_ms(ktime_get()); | ||
243 | } | ||