Date: Tue, 13 Mar 2018 16:09:04 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330848 - stable/11/sys/compat/linuxkpi/common/include/linux Message-ID: <201803131609.w2DG94bF094756@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Tue Mar 13 16:09:04 2018 New Revision: 330848 URL: https://svnweb.freebsd.org/changeset/base/330848 Log: MFC r330273: Implement ktime_get_raw() function in the LinuxKPI. Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Tue Mar 13 16:07:38 2018 (r330847) +++ stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Tue Mar 13 16:09:04 2018 (r330848) @@ -189,6 +189,15 @@ ktime_get_real_seconds(void) return (ts.tv_sec); } +static inline ktime_t +ktime_get_raw(void) +{ + struct timespec ts; + + nanotime(&ts); + return (timespec_to_ktime(ts)); +} + static inline u64 ktime_get_raw_ns(void) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803131609.w2DG94bF094756>