Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20345
b: refs/heads/master
c: b2ee9db
h: refs/heads/master
i:
  20343: ca16d49
v: v3
  • Loading branch information
Roman Zippel authored and Linus Torvalds committed Feb 15, 2006
1 parent f8d769f commit b36105e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f6164f3092832e0d9b12eed52e09a76bf39c64a
refs/heads/master: b2ee9dbfad14ba8e34a589d552ddc67300a26bec
10 changes: 8 additions & 2 deletions trunk/include/linux/ktime.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,16 @@ static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; })

/* convert a timespec to ktime_t format: */
#define timespec_to_ktime(ts) ktime_set((ts).tv_sec, (ts).tv_nsec)
static inline ktime_t timespec_to_ktime(struct timespec ts)
{
return ktime_set(ts.tv_sec, ts.tv_nsec);
}

/* convert a timeval to ktime_t format: */
#define timeval_to_ktime(tv) ktime_set((tv).tv_sec, (tv).tv_usec * 1000)
static inline ktime_t timeval_to_ktime(struct timeval tv)
{
return ktime_set(tv.tv_sec, tv.tv_usec * NSEC_PER_USEC);
}

/* Map the ktime_t to timespec conversion to ns_to_timespec function */
#define ktime_to_timespec(kt) ns_to_timespec((kt).tv64)
Expand Down

0 comments on commit b36105e

Please sign in to comment.