mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Add ns_to_ktime() to the LinuxKPI.
MFC after: 1 week
This commit is contained in:
parent
934277c59c
commit
1fde37964d
1 changed files with 9 additions and 0 deletions
|
|
@ -51,6 +51,15 @@ ktime_to_ns(ktime_t kt)
|
|||
return kt.tv64;
|
||||
}
|
||||
|
||||
static inline ktime_t
|
||||
ns_to_ktime(uint64_t nsec)
|
||||
{
|
||||
ktime_t kt;
|
||||
|
||||
kt.tv64 = nsec;
|
||||
return (kt);
|
||||
}
|
||||
|
||||
static inline int64_t
|
||||
ktime_divns(const ktime_t kt, int64_t div)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue