Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/include/linux provide ktime_ms_delta



details:   https://anonhg.NetBSD.org/src/rev/95512b150542
branches:  trunk
changeset: 1028143:95512b150542
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:58:18 2021 +0000

description:
provide ktime_ms_delta


Author: Maya Rashish <maya%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/include/linux/ktime.h |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (36 lines):

diff -r 02b82d7df68a -r 95512b150542 sys/external/bsd/drm2/include/linux/ktime.h
--- a/sys/external/bsd/drm2/include/linux/ktime.h       Sun Dec 19 01:58:11 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/ktime.h       Sun Dec 19 01:58:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ktime.h,v 1.14 2021/12/19 01:25:58 riastradh Exp $     */
+/*     $NetBSD: ktime.h,v 1.15 2021/12/19 01:58:18 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -54,6 +54,12 @@
        return ktime_to_ns(kt)/1000;
 }
 
+static inline int64_t
+ktime_to_ms(ktime_t kt)
+{
+       return ktime_to_ns(kt)/1000000;
+}
+
 static inline ktime_t
 ns_to_ktime(int64_t nsec)
 {
@@ -166,6 +172,13 @@
        return ktime_to_us(ktime_sub(a, b));
 }
 
+static inline int64_t
+ktime_ms_delta(ktime_t a, ktime_t b)
+{
+       return ktime_to_ms(ktime_sub(a, b));
+}
+
+
 static inline bool
 time_in_range(unsigned long x, unsigned long a, unsigned long b)
 {



Home | Main Index | Thread Index | Old Index